Do you have to use migrations from the beggining, or can you start with an allready existing DB and build upon it with migrations ? --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Phlip
2007-Feb-18 19:19 UTC
Re: Can you do migrations with an allready existing mysql DB ?
surfivor wrote:> Do you have to use migrations from the beggining, or can you start > with an allready existing DB and build upon it with migrations ?Yes. -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!! --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org
2007-Feb-18 19:29 UTC
Re: Can you do migrations with an allready existing mysql DB ?
Hi -- On Sun, 18 Feb 2007, surfivor wrote:> > > Do you have to use migrations from the beggining, or can you start > with an allready existing DB and build upon it with migrations ?You can use migrations on an existing database. In general, though, if you use migrations, they really want to be in charge; it''s error-prone to mix migrations and other database-changing techniques, because the migration system has its own idea of what level the database is at and what''s there. So it''s probably best either to decide to switch entirely to migrations (possibly even dumping the schema into migration-friendly form and reloading it, though that may be overkill) or avoid them. David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com) --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Naturally Yes. But take a care about the situation when you would like to go back with db:migrate VERSION = 0. Perhaps you would like to make the situation where you can go to the empty database and to be able to build from the scratch with migrations. One more thing, kip in mind the same situation has to be met in production environment. dima --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Theron Parlin
2007-Feb-19 12:09 UTC
Re: Can you do migrations with an allready existing mysql DB ?
Check out: http://weblog.jamisbuck.org/2005/9/27/getting-started-with-activerecord-migrations On Feb 18, 11:56 am, "surfivor" <surf...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Do you have to use migrations from the beggining, or can you start > with an allready existing DB and build upon it with migrations ?--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---