Constraint
also: constraints, unique constraint, check constraint, constraint violation
A rule the database enforces on your data, like "every user needs an email" or "no two users can share one". Data that breaks the rule is rejected.
A rule defined in the schema and enforced by the database on every write: NOT NULL, UNIQUE, CHECK, PRIMARY KEY and FOREIGN KEY. A write that violates it fails with an error, no matter what the app code intended.
A parking garage barrier set to a height limit. It doesn't matter who's driving or what the app said. A vehicle that's too tall doesn't get in.
Constraints are your last line of defense against bad data, even when the app code has bugs. When an agent hits a constraint error, the right fix is usually in the data or the code, not removing the rule.
Signup failed with a unique constraint violation on users.email. That address is already registered, so I'll show a friendly error instead of crashing.
Don't remove the constraint to make this error go away. Find out which data or code is breaking the rule and explain it to me.
Thinking the constraint is the bug. Usually it's correctly catching a real problem somewhere else.