Tagged: NO_ZERO_DATE

在 MySQL 8.0 中设置 datetime 的默认值为 '0000-00-00 00:00:00' 时报错:SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'operated_at_gmt' 0

Set the default value of DateTime in Laravel 9, MySQL 8.0 to0000-00-00 00:00:00Time error: sqlstate[42000]: Syntax error or access Violation: 1067 Invalid default value forOPERATED_AT_GMT

浏览量: 2 1. Set the default value of DateTime in MySQL 8.0 to be0000-00-00 00:00:00Time error: sqlstate[42000]: Syntax error or access Violation: 1067 Invalid default value forOPERATED_AT_GMT. as shown in Figure 1 2. Reference:https://www.shuijingwanwq.com/2022/09/28/6993/In...