[Sqlalchemy-tickets] Issue #3155: nullable is ignored when creating TIMESTAMP COLUMN in mysql (zzze
Brought to you by:
zzzeek
|
From: David L. <iss...@bi...> - 2014-08-04 08:11:44
|
New issue 3155: nullable is ignored when creating TIMESTAMP COLUMN in mysql https://bitbucket.org/zzzeek/sqlalchemy/issue/3155/nullable-is-ignored-when-creating David Lents: e.g: last_access = Column(TIMESTAMP(), nullable=False, server_default=text('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'))) results in: `last_access` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP This appears to be caused by dialects/mysql/base.py line 1679: if not column.nullable and not is_timestamp: colspec.append('NOT NULL') This doesn't seem correct, as NOT NULL changes the behavior of timestamp type in mysql if I'm not mistaken. |