I guess this might be the answer. http://stackoverflow.com/questions/14461851/how-to-have-an-automatic-timestamp-in-sqlite
Basically SQLite doesn't have a datetime data type, but it does accept anything as field type. When you seed, you are doing a plain insert to the database ( It didn't trigger Eloquent model which will fill the timestamp for you ). If you do not specify the datetime field, which in this case, default in NULL, you will get an error since there is not an automatic default value for a "datetime" type in SQLite.
Maybe try put it defaults to 0000-00-00 00:00:00 for that field and see if it works? :D
Thanks, awsp! This seems to be the answer indeed!
After switching from
$table->timestamps();
to
$table->nullableTimestamps();
in the migration file the error doesn't occur anymore. So now I have to change that in every single migration-file...
I really hope future versions of Laravel will handle this automatically!
Anyway: Thank you very much!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community