Changeset 8039
- Timestamp:
- 10/26/07 21:11:07 (2 years ago)
- Files:
-
- trunk/railties/CHANGELOG (modified) (1 diff)
- trunk/railties/lib/tasks/databases.rake (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/railties/CHANGELOG
r8020 r8039 1 1 *SVN* 2 3 * Added db:rollback to rollback the schema one version (or multiple as specified by STEP) [Jeffrey Allan Hardy] 2 4 3 5 * Fix typo in test_helper. Closes #9925 [viktor tron] trunk/railties/lib/tasks/databases.rake
r7718 r8039 85 85 ActiveRecord::Migrator.migrate("db/migrate/", ENV["VERSION"] ? ENV["VERSION"].to_i : nil) 86 86 Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby 87 end 88 89 desc 'Rolls the schema back to the previous version. Specify the number of steps with STEP=n' 90 task :rollback => :environment do 91 step = ENV['STEP'] ? ENV['STEP'].to_i : 1 92 version = ActiveRecord::Migrator.current_version - step 93 ActiveRecord::Migrator.migrate('db/migrate/', version) 87 94 end 88 95