Do you have to use migrations from the beggining, or can you start with an allready existing DB and build upon it with migrations ?
on 2007-02-18 17:57
on 2007-02-18 20:20
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!!!
on 2007-02-18 20:30
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)
on 2007-02-18 20:40
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
on 2007-02-19 13:10