mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add hint to error message of task db:migrate:down
This commit is contained in:
parent
40e7fe3451
commit
b2831904e5
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ db_namespace = namespace :db do
|
||||||
# desc 'Runs the "down" for a given migration VERSION.'
|
# desc 'Runs the "down" for a given migration VERSION.'
|
||||||
task :down => [:environment, :load_config] do
|
task :down => [:environment, :load_config] do
|
||||||
version = ENV['VERSION'] ? ENV['VERSION'].to_i : nil
|
version = ENV['VERSION'] ? ENV['VERSION'].to_i : nil
|
||||||
raise 'VERSION is required' unless version
|
raise 'VERSION is required - To go down one migration, run db:rollback' unless version
|
||||||
ActiveRecord::Migrator.run(:down, ActiveRecord::Migrator.migrations_paths, version)
|
ActiveRecord::Migrator.run(:down, ActiveRecord::Migrator.migrations_paths, version)
|
||||||
db_namespace['_dump'].invoke
|
db_namespace['_dump'].invoke
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue