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 error:
[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)
as well as a PDOException:
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'
How can I fix this?
Thanks.
created_at
coloumn you had any default value ? You should not have it !! You should have only the datetime coloumn as its datatype