Categories
Fixing Stuff Laravel Samuel

Fixing Local Laravel Migration On Wamp 3.0.6

So We ran into an issue today when trying to migrate an old project on a newer version of wamp. The error we kept getting is:


[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at' (SQL: create table `marketing_sources` (`id` int unsign
ed not null auto_increment primary key, `name` varchar(100) not null, `note
s` text null, `created_at` timestamp default 0 not null, `updated_at` times
tamp default 0 not null) default character set utf8 collate utf8_unicode_ci
)

This error is caused by mysql not accepting a timestamp of 0 as the default set time. To fix this issue open up:

app > config > local-environment-folder > database.php

Then add the following line:
'strict' => true

*please note if you are using mysql then add this line to the mysql array.