I created a rail model by doing
script/generate model Customer name:string address:string city:string state:string zip:integer [...]
I populated the database with 5,000 clients and started building my application. Now I realized that my model is not normalized: I often have several clients at the same address! If I want to do something at an address, such as mail, this will cause problems. What I would like to have is a model Address, model Customerand model Mailing.
Is there a way for rails to normalize an existing model by dividing it into two models? Or should I just write a script to normalize my existing data, and then generate new models accordingly?
source
share