开发者

Rails synchronize mysql tables from remote database

开发者 https://www.devze.com 2023-03-11 15:07 出处:网络
I have rails 2.3.11 , ruby 1.8 I have one database in my projects, but i want take emails from another database (another adress) for example i 开发者_StackOverflowhave users@users, and email in resp

I have rails 2.3.11 , ruby 1.8

I have one database in my projects, but i want take emails from another database (another adress) for example i 开发者_StackOverflowhave users@users, and email in respondents@respondents.

Question: Is it possible to take emails from one database for example and paste in another?


There is a good blog post about accessing multiple databases in rails here: http://www.rubynaut.net/articles/2008/05/31/how-to-access-multiple-database-in-rails.html

Alternatively if there data in both databases isn't changing regularly you could write a rake task that read from both databases, combined the data and wrote it about out to a single database and then just work from that?

0

精彩评论

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