开发者

Importing redefined SQL data from old app to new one

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开发者_Go百科 the job)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜