I have no problem in Laravel 5.2, but after creating a migration for the User model in Laravel 5.3, it shows the following error:
SQLSTATE[HY000]: General error: 1364 Field "family" has no default value
! ! !
In model users:
1 2 3 |
|
Migrating:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
What is my problem?
P粉1484347422023-10-23 14:55:23
You should add ->nullable()
or ->default('somethingHere')
to fields that send null values.
1 |
|
Or set the default value:
1 |
|
Than re-migration:
1 |
|
and
1 |
|