-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorstaleIndicates issues, pull requests, or discussions are inactiveIndicates issues, pull requests, or discussions are inactive
Description
Bug Report
Description
@schema
class Table(dj.Manual):
definition = """
t = CURRENT_TIMESTAMP : timestamp
"""
@schema # pymysql.err.OperationalError: (1067, "Invalid default value for 't'")
class Copy(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
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorstaleIndicates issues, pull requests, or discussions are inactiveIndicates issues, pull requests, or discussions are inactive