Re: [sqlalchemy] Re: How to stop SQLAlchemy from adding an ON UPDATE clause to a TIMESTAMP column by default

2014-01-10 Thread Steve Johnson
My solution, since sqlalchemy seems to be ignoring the nullable and default kwargs, is this: time = Column( TIMESTAMP(), primary_key=True, server_default=text("'-00-00 00:00:00'")) The default is just never used. On Friday, January 10, 2014 12:2

Re: [sqlalchemy] Re: How to stop SQLAlchemy from adding an ON UPDATE clause to a TIMESTAMP column by default

2014-01-10 Thread Steve Johnson
I realize this thread is ancient, but I'm resurrecting it for Googleable posterity since I just ran across the same issue. The problem is that MySQL "helpfully" inserts the ON UPDATE cheese unless you specify a default and/or a NULL/NOT NULL value in the CREATE TABLE query. http://dev.mysql.co