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
-----Original Message-----
From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
[mailto:rubyonrails-talk@googlegroups.com] On Behalf Of JannaB
Sent: Friday, May 29, 2009 6:32 AM
To: Ruby on Rails: Talk
Subject: [Rails] sql -> migrations ?
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.
GHC Confidentiality Statement
This message and any attached files might contain confidential information
protected by federal and state law. The information is intended only for the use
of the individual(s) or entities originally named as addressees. The improper
disclosure of such information may be subject to civil or criminal penalties. If
this message reached you in error, please contact the sender and destroy this
message. Disclosing, copying, forwarding, or distributing the information by
unauthorized individuals or entities is strictly prohibited by law.