I'm writing tests for an app now and need a test database.  I've decided 
to use sqlite, though production is Postgres.  I've dreaded the thought 
of populating the test database because there are many tables and 
constraints which means I have to populate them in the correct order, etc.

SA seems to have some ability to determine dependencies as demonstrated 
in metadata.create_all().  I'm wondering if it is feasible to use those 
abilities to determine the order in which tables must be populated.  For 
example.  Say I have tables A, B, C, and D.  My test requires table C 
and C depends on D, but not A and B.  Therefore I must populate tables D 
and C (in that order) to run the test.  Does SA contain functionality 
that could aid in this process?

When it comes to syncing, can an object be copied from one session to 
another, then flushed?

Randall

Jonathan Ellis wrote:
> On 7/12/06, *Steve Zatz* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     I am trying to find the most efficient way to keep two databases in
>     sync.
> 
> 
> What is the difference between what you are trying to do and 
> replication?  Replication should really be handled at a lower level than 
> SA.  Most modern DBs have a replication solution available.
> 
> -- 
> Jonathan Ellis
> http://spyced.blogspot.com
> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to