If I have an ancient app which uses a (MySQL) database because the db structure was NOT created by migrations -- is there a way I can go from the DB stricture to the migration files so that I could recreate the DB on a different machine with a different type of DB ? Thanks, RVince. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Dec 14, 2009 at 4:43 PM, RVince <rvince99-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> If I have an ancient app which uses a (MySQL) database because the db > structure was NOT created by migrations -- is there a way I can go > from the DB stricture to the migration files so that I could recreate > the DB on a different machine with a different type of DB ? Thanks, > RVince.rake db:schema:dump and rake db:schema:load -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I assume you know this because you asked just for the "structure", but the rake commands that Rick points you at will get you what you asked for, but not things like FK constraints, other constraints, transactions, etc. It will give you the schema though. Andrew -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hello, Moreover if you use specific Mysql type such as ENUM or SET. It may not be take in account during the dump. But you will find some plugins or gems that fix some problems : http://enum-column.rubyforge.org/ : for the ENUM type http://activewarehouse.rubyforge.org/rails_sql_views/ : for the views ... Mickael 2009/12/15 Andrew Pace <andrewppace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> I assume you know this because you asked just for the "structure", but > the rake commands that Rick points you at will get you what you asked > for, but not things like FK constraints, other constraints, > transactions, etc. It will give you the schema though. > > Andrew > > -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks guys, This was precisely what I was looking for. -RVince. On Dec 15, 4:53 am, Mickael Gerard <mika...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > > Moreover if you use specific Mysql type such as ENUM or SET. > It may not be take in account during the dump. But you will find some > plugins or gems that fix some problems :http://enum-column.rubyforge.org/: for the ENUM typehttp://activewarehouse.rubyforge.org/rails_sql_views/: for the views > ... > > Mickael > > 2009/12/15 Andrew Pace <andrewpp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > I assume you know this because you asked just for the "structure", but > > the rake commands that Rick points you at will get you what you asked > > for, but not things like FK constraints, other constraints, > > transactions, etc. It will give you the schema though. > > > Andrew > > > -- > > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.