> -----Original Message-----
> From: sqlalchemy@googlegroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of Chris Withers
> Sent: 13 February 2008 13:51
> To: sqlalchemy@googlegroups.com
> Subject: [sqlalchemy] Re: schema changes
> 
> 
> Michael Bayer wrote:
> > 
> >> What if they exist but don't match the spec that SA has created?
> > 
> > just try it out...create_all() by default checks the system 
> tables for  
> > the presence of a table first before attempting to create it 
> 
> Cool,
> 
> > (same  
> > with dropping). 
> 
> When would SA drop a table?


When you ask it to via metadata.drop_all() or table.drop(). Docs are
here:

http://www.sqlalchemy.org/docs/04/metadata.html#metadata_creating


> 
> > this is controlled by a flag called "checkfirst".
> 
> This a parameter to the methods or does it need to be set in 
> some config 
> file?
> 


See the docs referenced above. SQLAlchemy on its own doesn't use config
files, but some of the frameworks that use it (eg. TurboGears and
pylons) allow some SQLAlchemy-related configuration to be done in config
files.


> > 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.   
> 
> Good plan.
> 
> > 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.
> 
> Do the projects have a name?
> 


I don't know about generic comparisons, but the Migrate project might be
a place to start:

http://code.google.com/p/sqlalchemy-migrate/

(Note that it is only in the process of being updated for SA 0.4)

Hope that helps,

Simon

--~--~---------~--~----~------------~-------~--~----~
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