[V5] Invalid default value for 'created_at' #2002
-
Hello, At https://preview.adonisjs.com/guides/auth/setup#run-migrations i run into an error. First I needed to fix the default value for the timestamps on the users migration. Then I rerun
I cant find any solutions on google according that problem. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I found a solution on that, whicht should be done by default. at (api_tokens migrationfile)
|
Beta Was this translation helpful? Give feedback.
-
If you use MySQL 5.x you should remove all parameters from timestamps |
Beta Was this translation helpful? Give feedback.
If you use MySQL 5.x you should remove all parameters from timestamps
table.timestamp()
or pass 2 true valuestable.timestamp(true, true)
. In MySQL 8.x you don't need to do anything. It should be fine.