Fer Martin
unread,May 25, 2011, 5:48:01 AM5/25/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Hey,
At ShowNearby we have been doing a very big migration to RoR 3.1 from
PHP and we are facing several problems that may be some of you have
solved before.
We have big amounts of data and we decided to segregate our DB into
several DBs that we can handle separately. For example, our accounts,
places, logs and others are split into several databases
We need to get migrations, fixtures, models, to play nicely, and so
far it has been quite messy. Some of our requirements for a solution
to be acceptable:
- one model should relate to one tables in one of the databases.
- rake db:drop - should drop all the database env we specify in
database.yml
- rake db:create - should create all the database env we specify in
database.yml
- rake db:migrate - should run migrations to the various databases
- rake db:test - should grab fixtures and drop them into the various
databases and test unit/function/etc
We are considering setting separate rails projects per each database
and connecting them with ActiveResource, but we feel this is not very
efficient. Have any of you deal with a similar problem before?
Thanks so much!!
Fer Martin