server_default doesn't accept boolean value
Issue #1403
resolved
SQLAlchemy refuses the following declaration:
ok = Column(Boolean, nullable=False, default=False, server_default=False)
You have to use the following instead, but I'm not sure it's portable (and it's also less natural to type):
ok = Column(Boolean, nullable=False, default=False, server_default="0")
Comments (4)
-
repo owner -
repo owner - changed component to schema
-
- changed status to duplicate
- marked as enhancement
- changed milestone to 0.5.4
Duplicate of
#1204. -
repo owner - removed milestone
Removing milestone: 0.5.4 (automated comment)
- Log in to comment
server defaults aren't portable period. Bind parameters can't be used in DDL and we don't handle formatting of literals - in most cases, basic string or integer defaults are all you can count on across databases - things like dates, booleans etc. are more sketchy. so I'd call this a "wontfix".