On Monday, July 22, 2019 at 9:36:10 PM UTC-4, Mike Bayer wrote:

>
> likely , the "create_constraint" flag should default to False for booleans 
> and enums.   I think it was a mistake to default these to true, I think 
> people usually don't care.
>

Everything you said was apparent to me, but I'm a seasoned SqlAlchemy 
user.  I dove into the docs and didn't see warning dragons or anything that 
would suggest this happens alongside the Alembic or Boolean docs... this 
seemed like something that would trip up inexperienced users.

I'm assuming I never saw this before on Postgres or MySql because sqlite 
requires a constraint to mimic boolean behaviors as there is no native 
type, but I usually reflect tables on those platforms so that could be the 
reason.

Would it make sense to default the constraint name to something like 
"sa_autoname_xxxxx' where xxxx is a random hash?


-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/0afd534d-f60c-4434-9a61-3db41e918bc5%40googlegroups.com.

Reply via email to