Pull request #677: RED-6407 - added unique constraints according to business logic

Merge in RED/persistence-service from RED-6407 to master

* commit '9b11f90ab95619027952e40d681e17b4dea55ea6':
  RED-6407 - added unique constraints according to business logic
This commit is contained in:
Timo Bejan 2023-04-24 10:35:23 +02:00
commit bcd79f9957
2 changed files with 10 additions and 0 deletions

View File

@ -125,3 +125,5 @@ databaseChangeLog:
file: db/changelog/tenant/sql/46-add-keep_image_metadata.sql
- include:
file: db/changelog/tenant/sql/47-add-keep_hidden_text.sql
- include:
file: db/changelog/tenant/sql/203-spring-acl-constraints.changelog.sql

View File

@ -0,0 +1,8 @@
ALTER TABLE acl_class
ADD CONSTRAINT acl_class_unique UNIQUE (class);
ALTER TABLE acl_sid
ADD CONSTRAINT acl_sid_unique UNIQUE (sid, principal);
ALTER TABLE acl_object_identity
ADD CONSTRAINT acl_object_identity_unique UNIQUE (object_id_class, object_id_identity);
ALTER TABLE acl_entry
ADD CONSTRAINT acl_entry_unique UNIQUE (acl_object_identity, ace_order);