> > ...and what happens if these methods are called and the tables
> > already exist?
> >
> > What if they exist but don't match the spec that SA has created?
>
> if you're concerned about people running your application against
> databases created from a different version and then failing, I
> would suggest adding a "version" table to your database which
> contains data corresponding against the version of your application
> in some way. There has been interest among some SA users over
> building a generic "schema comparison" system and I think even some
> prototypes are available, though I think thats a fairly complicated
> and unreliable approach to take for this particular issue.
>
we've put such a notion in our db, so the db knows what model-version 
it matches. Then, at start, depending on the versions one can decide 
which migration script to execute (if the db should be made to match 
the py-model), or which feautures to drop (if py-model should follow 
the db). btw there should be some tricky strategy as of what to 
call "db-model-version" and when that "version" really changes.

As of the diff, sooner or later i'll have that really working, the one 
in dbcook.misc is just a start, to show it is possible. Although it 
would be only useful to automate to some extent the creation of 
migration scripts; the rest would still be a manual work.
btw there should be some "readonly" way to start such an app (like 
*nix initial filesystem mounting); last month i run one new app by 
mistake over some legacy mssql db of completely different app, and it 
did create _alot_ of things; by chance there was nothing overwriten 
so noone really caught me (-:.

ciao
svilen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to