Commit bfc3f780 by Andrew Goodnough

Runs annotate on 'rake db:rollback' too

parent 396db8df
...@@ -5,12 +5,13 @@ ...@@ -5,12 +5,13 @@
# run after doing db:migrate. # run after doing db:migrate.
namespace :db do namespace :db do
task :migrate do [:migrate, :rollback].each do |cmd|
task cmd do
Rake::Task['set_annotation_options'].invoke Rake::Task['set_annotation_options'].invoke
Annotate::Migration.update_annotations Annotate::Migration.update_annotations
end 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
...@@ -18,6 +19,7 @@ namespace :db do ...@@ -18,6 +19,7 @@ namespace :db do
end end
end end
end end
end
end end
module Annotate module Annotate
......
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