Answer the question
In order to leave comments, you need to log in
How to specify a specific date by default for the timestamp field in laravel migration?
I am preparing migrations for a project on Laravel 5.4, there was a need to set the default value for the timestamp field at 2038-01-19 03:14:06
I don’t want to perform migration for the sake of samples with a finger to the sky, but I don’t have enough experience.$table->timestamp('expires_at')->default(???);
Answer the question
In order to leave comments, you need to log in
The correct solution was to simply pass the default value as a string.
Everything is simple in Laravel. As always
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question