Skip to content
Advertisement

Tag: nullable

Default value for username in SQL database

I’m writing a Laravel application, and for testing in sqlite you need to specify ->nullable() or ->default(“123”) for all fields in your migration. This confuses me as my User-migration currently looks like this: Many of these make no sense to add neither ->default(“123”) nor ->nullable() to. Username is a good example, I can’t have null as a username in the

Advertisement