关于laravel5迁移数据库报错的问题

运行了php artisan migrate后报错

SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at' (SQL: create table
users
(
id
int unsigned not null
auto_increment primary key,
name
varchar(255) not null,
email
varchar(2
55) not null,
password
varchar(60) not null,
remember_token
varchar(100
) null,
created_at
timestamp default 0 not null,
updated_at
timestamp d
efault 0 not null) default character set utf8 collate utf8_unicode_ci)

不知道是什么问题??
已邀请:

hutaoseven

赞同来自:

Invalid default value for 'created_at' : created_at 字段的默认值无效
正确应为:created_at timestamp default '0000-00-00 00:00:00' not null (同理updated_at)

要回复问题请先登录注册