关于laravel5迁移数据库报错的问题
运行了php artisan migrate后报错
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at' (SQL: create table
auto_increment primary key,
55) not null,
) null,
efault 0 not null) default character set utf8 collate utf8_unicode_ci)
不知道是什么问题??
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at' (SQL: create table
users(
idint unsigned not null
auto_increment primary key,
namevarchar(255) not null,
55) not null,
passwordvarchar(60) not null,
remember_tokenvarchar(100
) null,
created_attimestamp default 0 not null,
updated_attimestamp d
efault 0 not null) default character set utf8 collate utf8_unicode_ci)
不知道是什么问题??
1 个回复
hutaoseven
赞同来自:
正确应为:created_at timestamp default '0000-00-00 00:00:00' not null (同理updated_at)