Hi, I''m working on a project where the database design was done by a non- rails developer. I have .sql file with create table scripts. Is there anything out there to convert a .sql file to Rails Migrations? Thanks in advance. Scott. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
ixquic696969-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Sep-08 19:36 UTC
Re: SQL Script to Migrations
go to the db directory and say: rake schema_dump (which creates a new schema.rb from the database specified in database.yml) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 08/09/06, ixquic696969-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <ixquic696969-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > go to the db directory and say: > > rake schema_dumpActually, you can run this (and any other rake tasks) from anywhere in the project tree. Rake shares a cool feature with Ant[1] - if it can''t find a Rakefile in the current directory, it will look in the parent directory, then *that* directorys parent, and so on until it finds one (that''s why it prints ''in /foo/blah/projectdir'' to tell you where it found the Rakefile). Dick. [1] despite it''s java roots, ant was one of the better build tools I''ve used. Saved me weeks of work, and made java development almost pleasant. -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---