开发者

rake db:migrate wipes out my database

I have an app that I'm porting from PHP/symfony to Ruby/Rails. Though the language is changing, there is no need to modify the database (MySQL) in any way.

Because I already have my database defined, there's no reason for me to individually create a Rails model for each table and manually specify the attributes of each model. Given the size of my database, that would be ridiculous.

Because I don't need to individually create models, my schema.yml is blank. Because schema.yml开发者_JAVA技巧 is blank, running rake db:migrate will wipe out my database. (At least I think that's the reason. I could be wrong.)

Can anyone recommend a way of handling this situation where I have an existing database but I don't want to manually re-define every single table for Rails?


Have you tried a rake db:dump ?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜