I have upgraded my app to rails 3.1 following Ryan Bates' instructions in Railscast Episode 282. Everything is working wonderfully except that new migrations generated are 开发者_运维技巧still following the old style of
class MigrationName < ActiveRecord::Migration
def up
end
def down
end
end
How do I upgrade things so new migrations are generated in the new style of:
class MigrationName < ActiveRecord::Migration
def change
end
end
The 3.1.0 generator only uses change
if it detects a migration that adds something. Maybe you didn't call rails g migration AddSomething
?
精彩评论