On Feb 8, 2012, at 11:11 PM, Jackson, Cameron wrote:

>  
> Mike, may I suggest this as an enhancement: If SQLA is creating a table with 
> an Enum column, and if there's already an Enum with the specified name, it 
> should spit out an error if the list of values for the existing and requested 
> Enums don't match?

Maybe, though would that same logic extend to other constructs ?  Such as, if 
you had a Table, and you said metadata.create_all(), that particular Table 
already exists.  Should SQLAlchemy go out, reflect that table and compare all 
the column names to the Table you have and report an error ?    Seems like the 
same thing.    

Alembic does this comparison, but it's more of a helper to write migrations 
rather than a consistency checker, since we can't reliably match everything 
about the database to what's defined in Python.




> ------------------------------------------------------------------------- 
> DISCLAIMER: This e-mail transmission and any documents, files and previous 
> e-mail messages attached to it are private and confidential. They may contain 
> proprietary or copyright material or information that is subject to legal 
> professional privilege. They are for the use of the intended recipient only. 
> Any unauthorised viewing, use, disclosure, copying, alteration, storage or 
> distribution of, or reliance on, this message is strictly prohibited. No part 
> may be reproduced, adapted or transmitted without the written permission of 
> the owner. If you have received this transmission in error, or are not an 
> authorised recipient, please immediately notify the sender by return email, 
> delete this message and all copies from your e-mail system, and destroy any 
> printed copies. Receipt by anyone other than the intended recipient should 
> not be deemed a waiver of any privilege or protection. Thales Australia does 
> not warrant or represent that this e-mail or any documents, files and 
> previous e-mail messages attached are error or virus free. 
> -------------------------------------------------------------------------
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> 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.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
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