You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@schemaclassTable(dj.Manual):
definition=""" t = CURRENT_TIMESTAMP : timestamp """@schema# pymysql.err.OperationalError: (1067, "Invalid default value for 't'")classCopy(dj.Manual):
definition= (Table().heading) # or 'Table().describe()'
In my case the server returns current_timestamp() as the default value for t but that value is not treated as a sql literal by datajoint. Therefore datajoint surrounds the value with quotation marks making it an invalid default value and leading to the error. One fix is to add current_timestamp() to the list of literals here. I would be happy to make a PR if you agree with that fix.
Reproducibility
DataJoint Version 0.14.1
MariaDB Version 10.3.38
The text was updated successfully, but these errors were encountered:
Bug Report
Description
In my case the server returns
current_timestamp()
as the default value fort
but that value is not treated as a sql literal by datajoint. Therefore datajoint surrounds the value with quotation marks making it an invalid default value and leading to the error. One fix is to addcurrent_timestamp()
to the list of literals here. I would be happy to make a PR if you agree with that fix.Reproducibility
The text was updated successfully, but these errors were encountered: