Forum: Ruby on Rails sql -> migrations ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9f4a65c520a69cd357d830661e172272?d=identicon&s=25 JannaB (Guest)
on 2009-05-29 15:33
(Received via mailing list)
Is there a way to take a db schema (say, as sql statements) and
reverse that back into files to use for migrations? how do you handle
legacy db's -- do you have to go and write the migration files
yourself from scratch? -Janna B.
D6434aa0b7b350f8c3ed0119d81b2ead?d=identicon&s=25 Roy Pardee (rpardee)
on 2009-05-30 01:28
(Received via mailing list)
Try pointing your config/database.yml at your legacy db & run 'rake
db:schema:dump'.  That should dump the current schema out to
db/schema.rb.

HTH,

-Roy
This topic is locked and can not be replied to.