开发者

Getting new Migrations generated after 3.1 upgrade

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜