Closed mateomu18 closed 6 years ago
The "default" property is for the SQL/db default. Use value
instead: 'date_created' => ['type' => 'datetime', 'value' => new \DateTime()],
Thak you!
2018-06-09 13:34 GMT-03:00 Vance Lucas notifications@github.com:
The "default" property is for the SQL/db default. Use value instead: 'date_created' => ['type' => 'datetime', 'value' => new \DateTime()],
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spotorm/spot2/issues/267#issuecomment-395982378, or mute the thread https://github.com/notifications/unsubscribe-auth/AdgVepmdlU1V4dbJD1Ny0TxIwkaMkhpiks5t6_kZgaJpZM4Ugjfg .
When i create an entity with a date/datetime attribute and set de "default" property of this fieldtype like new \Date() or new \DateTime() or new \Date(string) the migration done after returned an error. Why is this happening?? Error:
My intention is to do something like that:
MySql version: 10.2.12-MariaDB Php version: 7.2.1
Thanks in advance.