Missing Unique Constraint on email Field in users Table #65
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The
emailfield in theuserstable lacks a unique constraint, which allows multiple users to share the same email address. This violates database integrityrules and could lead to:
Root Cause
The
emailcolumn is not defined withUNIQUEconstraints in theuserstable creation script.Current Behavior
Proposed Fix
Add
UNIQUEconstraint to theemailcolumn in theuserstable creation script.Example (SQL syntax):
add the following at the end of the create block(inside not outside):