我正在尝试在我的Laravel实例上运行迁移.它们只是默认迁移(用户和密码重置),但是当它尝试生成时间戳时会抛出此错误:
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at' (SQL: create table `
users` (`id` int unsigned not null auto_increment primary key, `name` varchar(255) not null, `email` varchar(255) n
ot null, `password` varchar(60) not null, `remember_token` varchar(100) null, `created_at` timestamp default 0 not
null, `updated_at` timestamp default 0 not null) default character set utf8 collate utf8_unicode_ci)
Run Code Online (Sandbox Code Playgroud)
以及PDOException:
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
谢谢.