Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Username Constraints #366

Merged
merged 2 commits into from
Jun 8, 2021
Merged

Conversation

MGatner
Copy link
Collaborator

@MGatner MGatner commented Jun 8, 2021

The users table has a constraint of 30 characters on username:

'username' => ['type' => 'varchar', 'constraint' => 30, 'null' => true],

This is not enforced by our Model and occasionally violated by UserFaker. Normally this just truncates the input, but with strictOn it causes a database error.

This PR adds the constraint to the User model and adjusts the faker to use userName (now that punctuation is allowed).

@lonnieezell lonnieezell merged commit 4599540 into lonnieezell:develop Jun 8, 2021
@MGatner MGatner deleted the username-constraint branch June 8, 2021 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants