Ticket #11458: arrgh.diff
| File arrgh.diff, 1.7 kB (added by jbarnette, 2 months ago) |
|---|
-
activerecord/lib/active_record/migration.rb
old new 343 343 end 344 344 345 345 def run(direction, migrations_path, target_version) 346 self.new(direction, migrations_path, target_version) 346 self.new(direction, migrations_path, target_version).run 347 347 end 348 348 349 349 def schema_info_table_name -
railties/lib/tasks/databases.rake
old new 104 104 version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil 105 105 raise "VERSION is required" unless version 106 106 ActiveRecord::Migrator.run(:up, "db/migrate/", version) 107 Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby 107 108 end 108 109 109 110 desc 'Runs the "down" for a given migration VERSION.' … … 111 112 version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil 112 113 raise "VERSION is required" unless version 113 114 ActiveRecord::Migrator.run(:down, "db/migrate/", version) 115 Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby 114 116 end 115 117 end 116 118 … … 118 120 task :rollback => :environment do 119 121 step = ENV['STEP'] ? ENV['STEP'].to_i : 1 120 122 ActiveRecord::Migrator.rollback('db/migrate/', step) 123 Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby 121 124 end 122 125 123 126 desc 'Drops and recreates the database from db/schema.rb for the current environment.'