Hey,
I have an application running and I have been creating and editing the
table through my mysql interface up till now.
I want to create my migration files based on my MySQL tables but I have
so many tables it would take a long time to do it manually.
Is there anyway to generate migration files based on existing MySQL
tables?
Thanks for the help.
On Oct 15, 9:31 pm, Scott H. [email protected]
wrote:
Thanks for the help.
–
Posted viahttp://www.ruby-forum.com/.
There is an ‘extract fixtures’ rake task described in the rails recipes
book that can write your current data to a series of YAML files. That
may help some.
_Kevin
rake db:schema:dump
Will create /db/shema.rb with your entire database
migration schema.
You should look into how migrations work - if you make your changes
through migrations, you’ll have a versionable history of those changes,
versus having nothing when you just make the changes in your tool. There
was a post in the last couple weeks discussing migrations in detail.
c.
Scott H. wrote:
Hey,
I have an application running and I have been creating and editing the
table through my mysql interface up till now.
I want to create my migration files based on my MySQL tables but I have
so many tables it would take a long time to do it manually.
Is there anyway to generate migration files based on existing MySQL
tables?
Thanks for the help.