mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Default value for datetime type not working for sqlite #6019
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @elfin-sbreuers on GitHub (Jul 13, 2018).
The following annotation
should produce this outcome in sqlite
changed_at DATETIME DEFAULT CURRENT_TIMESTAMPbut produces
changed_at DATETIME DEFAULT '0' NOT NULLin version 2.6.2.
Did something change in the API or is this a bug?
Thanks in advance.
@caciobanu commented on GitHub (Jul 13, 2018):
You have to change your annotation to:
@Majkl578 commented on GitHub (Jul 13, 2018):
0definitely doesn't look correct, was it ever working before?There were some changes affecting
CURRENT_TIMESTAMP, see https://github.com/doctrine/doctrine2/issues/6698 / https://github.com/doctrine/dbal/issues/2859, but those should be resolved as of DBAL 2.7.@elfin-sbreuers commented on GitHub (Jul 16, 2018):
@caciobanu: Thanks. Works like a charm.