开发者

Rails schema not updating for a table

I have a development env and a beta env for the app that I am building. Yesterday I came across a strange error.

I wrote a migration to change one of the tables and it worked fine on my dev env. Once I deployed the changes to the beta env it ran and but when I access the page it started giving me trouble. The new columns that I added were all undefined columns when it comes to the beta environment. So looked at the schema for the column on the beta side using column_names function on the class and it still had the old columns while logging into mysql there and checking the fields in the table shows me the new ones.

An开发者_JAVA技巧yone have any idea why is the schema not updating while the database was updated. Is there anyway to update the schema for a class, like some function or something.


I'm having this problem too. So far, the only solution I've found is to rename the table.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜