开发者

When you upgrade an engine that has new migrations, how to run them?

开发者 https://www.devze.com 2023-03-08 05:54 出处:网络
I just updated refinerycms-news engine in my Gemfile from \'~> 0.9.8\' to :git => \'https://github.com/resolve/refinerycms-news.git\', and now there is an error caused by开发者_StackOverflow中文

I just updated refinerycms-news engine in my Gemfile from '~> 0.9.8' to :git => 'https://github.com/resolve/refinerycms-news.git', and now there is an error caused by开发者_StackOverflow中文版 a missing column. The migration to create the column can be found in the installed gem, but rake db:migrate does nothing. Is there another rake task or other step that will run it?


You'll have to follow this convention for Refinery CMS:

rails generate refinerycms_news
rake db:migrate

The generator copies only new migrations in and then rake db:migrate runs them.

Cheers, Phil

0

精彩评论

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