17 May 15:22
Re: two database migration (active record)
From: Phlip <phlip2005@...>
Subject: Re: two database migration (active record)
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-17 13:22:11 GMT
Subject: Re: two database migration (active record)
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-17 13:22:11 GMT
> I want to write script, that will migrate one database (with models) to > another database (with another models) using ActiveRecord and all of its > benefits. It is possible? Please give me any tips. > > I am moving database form old app to new one. It would be great to use > ActiveRecord for this complex task. An important rule of programming is to always be as incremental as possible. The bigger a change you make, the higher the risks go. If you want to deliver new features to a client, as soon as possible, leave the data in the old database, and hook up to them using ActiveRecord's system to set your models' table names, primary keys, etc. The book /Rails Recipes/ lists these techniques under "Integrating with Legacy Database". Don't make the mountain come to Mohammed, if Mohammed can just go to the mountain! Over time, when you need new tables, or if you find occassion to refactor the existing tables, you can rename them closer to ActiveRecord's notorious opinions. --~--~---------~--~----~------------~-------~--~----~ 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@... To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RSS Feed