views:

29

answers:

1

Hi,

I've nearly finished rewriting (with some new features) my Symfony (left a bit bad taste in mounth) application into Rails. There is some amount of data which I need to import from my old application into the new Rails app.

Problem is that schema was dramatically changed and some foreign key values should be updated.

I am wondering if there is some application which could help me with redefining and importing data, or I just should open phpMyAdmin, spend some time editing database and run Rails on the prepared one? (which in my opinion is not the best way to do the job)

+1  A: 

Depending on how dramatically the schema has changed you might want to look into an ETL library like ActiveWarehouse http://activewarehouse.rubyforge.org/etl/.

Alternatively you could write the sql migration to upgrade the data, but I don't know how complicated that would be in your case.

Also, if this is a one off and there isn't that much data and you only have one environment then doing it directly in the database isn't THAT bad, as long as going forward you make sure your migrating properly.

jonnii
Thanks for raising ETL thing.
sharas