Hi All,

Currently I am trying to figure out the best way to solve the following 
problem.

I have a database with 16 tables, defined in 16 declarative object 
definitions. This all works as expected.

The problem I am now facing is that from one of the definitions I do need 2 
versions, which are nearly identical ( the difference is the change of some 
column types and some additional columns).

Which is the best way to get this implemented while being able to have both 
versions active at the same time, with a bind to 2 different database 
engine(s).

What I did try was to have definition two import all the classes from 
definition one, and redefine the object that is changed with __table_args__ 
= {'extend_existin': True } as an atribute.
But this gives me the problem that when importing both definitions they 
share the same metadata. Making is impossible to connect each of the 
definitions to their own engine.


What I would expect that the result would be is that the following code 
will work.

from definition_one import mytable as table_one
from definition_two import mytable as table_two

assert table_one.metadata != table_two.metadata.

Regards,

Wouter

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to