开发者

DB Migrate not reflected on heroku

I recently created a db migration which works fine locally. I pushed to heroku and ran

heroku rake db:migrate

Whilst the command doesn't seem to throw an error, I can see the database hasn'开发者_C百科t been updated with the column I've tried to add to a table. I've tried running heroku rake db:setup but to no avail. Additionally, I've also tried restarting heroku after both commands but it still doesn't work.

Anybody have this problem before?


First try to be specific with heroku rake db:migrate:up VERSION=xxx I had similar problems and what I did was to reset the database, if that doesn't work, I would migrate down all migrations (one by one) and add them up again, of course only if you can afford to loose all your data, alternatively download the database and investigate. The problems I had with recreating the db were related to the fact that I was changing the migrations and that in heroku I had a shared database.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜