Laravel Migrations - Issues while creating timestamps

后端 未结 10 592
深忆病人
深忆病人 2021-02-05 15:35

I am trying to run migrations on my Laravel instance. They are just the default migrations (users and password resets) but when it tries to make the timestamps it throws this e

10条回答
  •  梦如初夏
    2021-02-05 16:16

    This is due to MySQL not accepting zero as a valid default date and thus the table creation fails a constraint check on creation.

    You probably have NO_ZERO_DATE enabled in your MySQL configuration. Setting this to off will allow you to create the table or alternatively remove the default 0 value or change it to CURRENT_TIMESTAMP.

    You can find out more about this exact issue here: https://github.com/laravel/framework/issues/3602

提交回复
热议问题