- Shipped
- April 20, 2026 at 8:06 PM UTC
- Author
- Kamo
- Commit
- 559376b
**************** + syncSecurityModelRoleRights use `ON CONFLICT (role_id, right_type) DO NOTHING` and `ON CONFLICT (default_role_id, right_type) DO NOTHING`, which require matching unique constraints on the DB tables. The matching `@UniqueConstraint` annotations on `OrgRoleRight` and **************** only take effect on CREATE TABLE, so existing databases never gained them — causing SecurityService startup to fail with `ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification`. Dedupe first in case legacy rows have duplicates that would block the ADD CONSTRAINT, then add both constraints idempotently via SchemaCleanupRunner.