-
Notifications
You must be signed in to change notification settings - Fork 108
Syntax error or access violation: 1067 Invalid default value for 'created_at #12
Comments
This is because the $table->timestamps('created_at') statement doesn't include a default value for the timestamps column. We should make a PR to fix that bug. To fix this, we have to write the follow in the migration file: You can use $table->timestamps() instead. |
Thanks for reporting @PopescuMarian ! That one slid right through when using sqlite. Im looking into it now. |
Added to this Trello board. Did not make it today, coming back tomorrow. Thanks @calvinchiulele for pointing out the reason! |
as a quick fix on this, on line 85 of AttributeFactory.js you can change the getNullable method to:
|
Fix for the default timestamps released in |
Hi, I am getting this error: "Syntax error or access violation: 1067 Invalid default value for 'created_at" when I migrate the generated migrations.
If I replace the generated timestamp('created_at') and timestamp('updated_at') with timestamps() then this error is gone.
I am using Laravel 5.8.
The text was updated successfully, but these errors were encountered: