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 ?
精彩评论