- Notifications
You must be signed in to change notification settings - Fork1k
Commitbcdade7
authored
fix: add database constraint to enforce minimum username length (#19453)
Username length and format, via regex, are already enforced at theapplication layer, but we have some code paths with database querieswhere we could optimize away many of the DB query calls if we could besure at the database level that the username is never an empty string.For example:#19395---------Signed-off-by: Callum Styan <callumstyan@gmail.com>1 parent72f58c0 commitbcdade7
File tree
5 files changed
+13
-3
lines changed- coderd/database
- migrations
5 files changed
+13
-3
lines changedSome generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + |
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1552 | 1552 |
| |
1553 | 1553 |
| |
1554 | 1554 |
| |
1555 |
| - | |
1556 |
| - | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
1557 | 1560 |
| |
1558 | 1561 |
| |
1559 | 1562 |
| |
|
0 commit comments
Comments
(0)