db:migrate タスクを実行している間、移行は実際には行われません。私のRakefileのコードは次のとおりです。
namespace :db do
desc "Migrate the database through scripts in lib/generators/facebook_event_fetcher/install/templates. Target specific version with VERSION=x"
task :migrate => :environment do
ActiveRecord::Migration.verbose = true
#ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil )
ActiveRecord::Migrator.migrate('lib/generators/facebook_event_fetcher/install/templates', nil)
end
task :environment do
ActiveRecord::Base.establish_connection(YAML.load_file("config/database.yml"))
ActiveRecord::Base.logger = Logger.new(File.open('db/database.log', 'a'))
end
end
Github リポジトリを詳しく見ることができます: https://github.com/mabounassif/facebook_event_fetcher/blob/master/Rakefile#L42
移行がトリガーされないのはなぜですか??