[Sqlalchemy-tickets] Issue #3067: Naming convention exception for Boolean type on PostgreSQL (zzzee
Brought to you by:
zzzeek
|
From: Maik R. <iss...@bi...> - 2014-06-03 13:04:23
|
New issue 3067: Naming convention exception for Boolean type on PostgreSQL https://bitbucket.org/zzzeek/sqlalchemy/issue/3067/naming-convention-exception-for-boolean Maik Riechert: ``` #!python mybool = Column(Boolean, nullable=False, default=False) ``` I use PostgreSQL which has a native boolean type. If I then also use naming convention: ``` #!python "ck": "ck_%(table_name)s_%(constraint_name)s", ``` Then sqlalchemy complains: sqlalchemy.exc.InvalidRequestError: Naming convention including %(constraint_name)s token requires that constraint is explicitly named. If I define the column as ``` #!python isPublic = Column(Boolean(create_constraint=False), nullable=False, default=False) ``` it works, so I think this is a bug in which sqlalchemy doesn't connect the fact that there is a native Boolean and no constraint exists actually. |