On 14 November 2011 17:15, cval eval <li...@ruby-forum.com> wrote:
> Well, analysis has shown that database should be refactored, because
> it's pretty unstructured, some data is duplicated or unnecessary etc.
> Some tables are used by another modules(not RoR).
> What is the best way (i mean easiest)) ) to redesign database?
> Should I use migrations?
> Or just write database in plain SQL and then generate objects from SQL
> tables?
> Or modify existing models manually?

First make sure you are using a Version Control System (git for
example) so you can track the changes you make.
Second, as Danaka has suggested, make sure you have full test coverage.
Then, yes use migrations to modify the database, one step at a time,
modify the models appropriately, and check the tests pass (along with
new ones you will write to check any new model methods).  Then make
the next change to the database and so on.

Colin

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to