Luca Parolari
Luca Parolari

Reputation: 15

Why laravel timestamp fields are nullables?

this is not a technical question.

I'm using laravel for several projects and today I had a doubt: why Laravel timestamp fields are can be null? Is there a portability reason behind this choice or it is only useful?

What is the principle that they applied on this choice?

Upvotes: 0

Views: 59

Answers (1)

Marcin Nabiałek
Marcin Nabiałek

Reputation: 111869

This is because of MySQL. If they weren't set nullable in some MySQL versions MySQL would put in there own values and when they are marked as nullable, MySQL won't put there own values and values from framework will be used.

Upvotes: 1

Related Questions