Re: DB_DataObject and multiple databases
| From: | Mike D'Ambrogia | Date: | Sun, 27 Apr 2008 16:46:41 +0000 |
| Subject: | Re: DB_DataObject and multiple databases | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28837@lists.php.net to get a copy of this message | ||
can anybody provide any insight on this?
On 4/22/2008 7:54 AM, Mike D'Ambrogia wrote:
I'm working on a migration project taking the data from an early version of an modified application in db1 and migrating it into a current version of the unmodified application on db2, like to figure out how to use dbdo to work with this so that I can massage the data into db2 as I go along
each database instance is on a separate system with different connection strings and login params. the database names are different, but the table names are very similar with most names matching between each db
I've been able to setup createtables.php to produce 2 dataobjects folders, one holding classes for the abstractions of db1 and the other for the abstraction of db2 (./includes/dataobjects_1.5.8 and ./includes/dataobjects_1.12)
I configured createtables to generate the classes with a class name prefix (class_prefix) to help keep the tables that share the same names in db1 and db2 unique (DataObjects158_table1 and DataObjects112_table1, etc)
hope that background makes sense...
so far so good
my problem is trying to figure out how to setup the environment to expose both database to the calling code at once
in http://pear.php.net/manual/en/package.database.db-dataobject.intro-configuration.php, when discussing multiple databases, the dbdo docs states:
/database_*/ string
When you have multiple databases you can use the database_* to specify the
DSN <http://pear.php.net/manual/en/package.database.db.intro-dsn.php> for
each database
When you have multiple databases you can use the table_* configuration variables to map individual tables to different databases<...snip>
the example is thin on specifics or a viable example, and I cannot find any reference to the table_* configuration variable.
any pointers?
thanks in advance for the help
mike