Commit bfc3f780 by Andrew Goodnough

Runs annotate on 'rake db:rollback' too

parent 396db8df
...@@ -5,16 +5,18 @@ ...@@ -5,16 +5,18 @@
# run after doing db:migrate. # run after doing db:migrate.
namespace :db do namespace :db do
task :migrate do [:migrate, :rollback].each do |cmd|
Rake::Task['set_annotation_options'].invoke task cmd do
Annotate::Migration.update_annotations Rake::Task['set_annotation_options'].invoke
end Annotate::Migration.update_annotations
end
namespace :migrate do namespace cmd do
[:change, :up, :down, :reset, :redo].each do |t| [:change, :up, :down, :reset, :redo].each do |t|
task t do task t do
Rake::Task['set_annotation_options'].invoke Rake::Task['set_annotation_options'].invoke
Annotate::Migration.update_annotations Annotate::Migration.update_annotations
end
end end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment