[LRUG] Multiple databases, migration, integration...
Riccardo Tacconi
rtacconi at gmail.com
Fri Jan 8 02:33:10 PST 2010
Hi,
I have an intranet written in PHP and MySql. I have integrated the intranet
with Rails by using PHPSESSID cookie and a web service (to share the same
session) and the PHP intranet and Rails app have the same visual template. I
started to write a new module for the intranet with Rails, hoping in the
future to migrate everything on Rails.
Yesterday I decided to refactor a page developed in PHP with Rails. I am
using two MySql databases, one for the PHP, one for Rails. Now I am not sure
if I should use only one database or two. The DB for PHP has name in the
singular form (dept, user, article...), the primary keys are something like
'deptID', 'user_id', in few words is an old rubbish inherited DB.
I started to use two databases, hoping to be able to move everything in the
new DB with Rails. But I am running in this issue:
http://forums.pragprog.com/forums/4/topics/3891
To connect to two databases I am using recipe #15 of 'Enterprise Recipe with
Ruby on Rails' (see the link). The problem is that is should connect to
different databases in development and production, not only for Rails
databases but also for the PHP databases.
But if I will use only one database I will not be able to use migrations and
I have 54 tables in the PP DB, plus that DB it is not designed properly. And
I do not know if Rails can manage pluralized tables and not pluralized one
at the same time. Any ideas and advises?
Thank you.
--
Riccardo Tacconi
VIRTUELOGIC LIMITED
http://www.linkedin.com/in/riccardotacconi
http://riccardotacconi.blogspot.com/
http://twitter.com/rtacconi
Linux user: #400461
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20100108/7d2f34d8/attachment-0003.html>
More information about the Chat
mailing list