开发者

Getting new Migrations generated after 3.1 upgrade

开发者 https://www.devze.com 2023-04-07 09:16 出处:网络
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 followi

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

精彩评论

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

关注公众号