- Ya
- 20 Aprili 2026, 20:06 UTC
- Mwandishi
- Kamo
- Ahadi ya
- 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.