diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-03-28 22:14:04 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-03-28 22:14:04 +0000 |
commit | 3704f4ba2e937e32677d461d54fdaa3172a1df8b (patch) | |
tree | ce447519d956c169dde272f8ab91cfdd67f3ed53 /railties | |
parent | a61b63d42056b119e061f7ebf31985887d569c79 (diff) | |
download | rails-3704f4ba2e937e32677d461d54fdaa3172a1df8b.tar.gz rails-3704f4ba2e937e32677d461d54fdaa3172a1df8b.tar.bz2 rails-3704f4ba2e937e32677d461d54fdaa3172a1df8b.zip |
Fix new migration versions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/tasks/databases.rake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index bd96b23351..40b60c1959 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -104,6 +104,7 @@ namespace :db do version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil raise "VERSION is required" unless version ActiveRecord::Migrator.run(:up, "db/migrate/", version) + Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby end desc 'Runs the "down" for a given migration VERSION.' @@ -111,6 +112,7 @@ namespace :db do version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil raise "VERSION is required" unless version ActiveRecord::Migrator.run(:down, "db/migrate/", version) + Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby end end @@ -118,6 +120,7 @@ namespace :db do task :rollback => :environment do step = ENV['STEP'] ? ENV['STEP'].to_i : 1 ActiveRecord::Migrator.rollback('db/migrate/', step) + Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby end desc 'Drops and recreates the database from db/schema.rb for the current environment.' |