xcom table creation fails during airflow initdb because default value not accepted
airflow initdb to update schema fails with this error for mysql
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1067, "Invalid default value for 'timestamp'") [SQL: u'\nCREATE TABLE xcom (\n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\t`key` VARCHAR(512), \n\tvalue BLOB, \n\ttimestamp DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, \n\texecution_date DATETIME NOT NULL, \n\ttask_id VARCHAR(250) NOT NULL, \n\tdag_id VARCHAR(250) NOT NULL, \n\tPRIMARY KEY (id)\n)\n\n']
Changed the timestamp type to TIMESTAMP instead of DATETIME and ran manually. Everything seems to work fine.
Similar to issue tracked and answered here: http://stackoverflow.com/questions/9005766/invalid-default-value-for-dateadded
That's from pypi not master is it? (I believe this has been addressed in master, but I need to push a new version to Pypi)
Same issue with version 1.5.0
8ab666cc7a59fad206524c65921a9e41cb5dc6c1
ok that's fixed in 1.5.1
Thx !