From 1eaef1e18ce38b3b2ae9b29bee49fb2188c80763 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Wed, 24 Jan 2024 16:09:10 +0100 Subject: [PATCH] move partner behind relationship in Liquibase scripts --- ...onship.sql => 220-hs-office-relationship.sql} | 0 ...bac.md => 223-hs-office-relationship-rbac.md} | 0 ...c.sql => 223-hs-office-relationship-rbac.sql} | 0 ... => 228-hs-office-relationship-test-data.sql} | 0 ...ice-partner.sql => 230-hs-office-partner.sql} | 5 +++-- ...ner-rbac.md => 233-hs-office-partner-rbac.md} | 0 ...r-rbac.sql => 233-hs-office-partner-rbac.sql} | 1 + ...ql => 234-hs-office-partner-details-rbac.sql} | 0 ...n.sql => 236-hs-office-partner-migration.sql} | 0 ...a.sql => 238-hs-office-partner-test-data.sql} | 0 .../db/changelog/db.changelog-master.yaml | 16 ++++++++-------- 11 files changed, 12 insertions(+), 10 deletions(-) rename src/main/resources/db/changelog/{230-hs-office-relationship.sql => 220-hs-office-relationship.sql} (100%) rename src/main/resources/db/changelog/{233-hs-office-relationship-rbac.md => 223-hs-office-relationship-rbac.md} (100%) rename src/main/resources/db/changelog/{233-hs-office-relationship-rbac.sql => 223-hs-office-relationship-rbac.sql} (100%) rename src/main/resources/db/changelog/{238-hs-office-relationship-test-data.sql => 228-hs-office-relationship-test-data.sql} (100%) rename src/main/resources/db/changelog/{220-hs-office-partner.sql => 230-hs-office-partner.sql} (90%) rename src/main/resources/db/changelog/{223-hs-office-partner-rbac.md => 233-hs-office-partner-rbac.md} (100%) rename src/main/resources/db/changelog/{223-hs-office-partner-rbac.sql => 233-hs-office-partner-rbac.sql} (99%) rename src/main/resources/db/changelog/{224-hs-office-partner-details-rbac.sql => 234-hs-office-partner-details-rbac.sql} (100%) rename src/main/resources/db/changelog/{226-hs-office-partner-migration.sql => 236-hs-office-partner-migration.sql} (100%) rename src/main/resources/db/changelog/{228-hs-office-partner-test-data.sql => 238-hs-office-partner-test-data.sql} (100%) diff --git a/src/main/resources/db/changelog/230-hs-office-relationship.sql b/src/main/resources/db/changelog/220-hs-office-relationship.sql similarity index 100% rename from src/main/resources/db/changelog/230-hs-office-relationship.sql rename to src/main/resources/db/changelog/220-hs-office-relationship.sql diff --git a/src/main/resources/db/changelog/233-hs-office-relationship-rbac.md b/src/main/resources/db/changelog/223-hs-office-relationship-rbac.md similarity index 100% rename from src/main/resources/db/changelog/233-hs-office-relationship-rbac.md rename to src/main/resources/db/changelog/223-hs-office-relationship-rbac.md diff --git a/src/main/resources/db/changelog/233-hs-office-relationship-rbac.sql b/src/main/resources/db/changelog/223-hs-office-relationship-rbac.sql similarity index 100% rename from src/main/resources/db/changelog/233-hs-office-relationship-rbac.sql rename to src/main/resources/db/changelog/223-hs-office-relationship-rbac.sql diff --git a/src/main/resources/db/changelog/238-hs-office-relationship-test-data.sql b/src/main/resources/db/changelog/228-hs-office-relationship-test-data.sql similarity index 100% rename from src/main/resources/db/changelog/238-hs-office-relationship-test-data.sql rename to src/main/resources/db/changelog/228-hs-office-relationship-test-data.sql diff --git a/src/main/resources/db/changelog/220-hs-office-partner.sql b/src/main/resources/db/changelog/230-hs-office-partner.sql similarity index 90% rename from src/main/resources/db/changelog/220-hs-office-partner.sql rename to src/main/resources/db/changelog/230-hs-office-partner.sql index c4491b0a..29a9b84f 100644 --- a/src/main/resources/db/changelog/220-hs-office-partner.sql +++ b/src/main/resources/db/changelog/230-hs-office-partner.sql @@ -33,8 +33,9 @@ create table hs_office_partner ( uuid uuid unique references RbacObject (uuid) initially deferred, partnerNumber numeric(5), - personUuid uuid not null references hs_office_person(uuid), - contactUuid uuid not null references hs_office_contact(uuid), + -- partnerRoleUuid uuid not null references hs_office_relationship(uuid), + personUuid uuid not null references hs_office_person(uuid), -- TODO: remove, replaced by partnerRoleUuid + contactUuid uuid not null references hs_office_contact(uuid), -- TODO: remove, replaced by partnerRoleUuid detailsUuid uuid not null references hs_office_partner_details(uuid) on delete cascade ); --// diff --git a/src/main/resources/db/changelog/223-hs-office-partner-rbac.md b/src/main/resources/db/changelog/233-hs-office-partner-rbac.md similarity index 100% rename from src/main/resources/db/changelog/223-hs-office-partner-rbac.md rename to src/main/resources/db/changelog/233-hs-office-partner-rbac.md diff --git a/src/main/resources/db/changelog/223-hs-office-partner-rbac.sql b/src/main/resources/db/changelog/233-hs-office-partner-rbac.sql similarity index 99% rename from src/main/resources/db/changelog/223-hs-office-partner-rbac.sql rename to src/main/resources/db/changelog/233-hs-office-partner-rbac.sql index 5757efc9..42edf137 100644 --- a/src/main/resources/db/changelog/223-hs-office-partner-rbac.sql +++ b/src/main/resources/db/changelog/233-hs-office-partner-rbac.sql @@ -182,6 +182,7 @@ call generateRbacRestrictedView('hs_office_partner', personUuid = new.personUuid, contactUuid = new.contactUuid $updates$); +-- partnerRoleUuid = new.partnerRoleUuid, --// diff --git a/src/main/resources/db/changelog/224-hs-office-partner-details-rbac.sql b/src/main/resources/db/changelog/234-hs-office-partner-details-rbac.sql similarity index 100% rename from src/main/resources/db/changelog/224-hs-office-partner-details-rbac.sql rename to src/main/resources/db/changelog/234-hs-office-partner-details-rbac.sql diff --git a/src/main/resources/db/changelog/226-hs-office-partner-migration.sql b/src/main/resources/db/changelog/236-hs-office-partner-migration.sql similarity index 100% rename from src/main/resources/db/changelog/226-hs-office-partner-migration.sql rename to src/main/resources/db/changelog/236-hs-office-partner-migration.sql diff --git a/src/main/resources/db/changelog/228-hs-office-partner-test-data.sql b/src/main/resources/db/changelog/238-hs-office-partner-test-data.sql similarity index 100% rename from src/main/resources/db/changelog/228-hs-office-partner-test-data.sql rename to src/main/resources/db/changelog/238-hs-office-partner-test-data.sql diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index 88c70bef..fdd04507 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -66,21 +66,21 @@ databaseChangeLog: - include: file: db/changelog/218-hs-office-person-test-data.sql - include: - file: db/changelog/220-hs-office-partner.sql + file: db/changelog/220-hs-office-relationship.sql - include: - file: db/changelog/223-hs-office-partner-rbac.sql + file: db/changelog/223-hs-office-relationship-rbac.sql - include: - file: db/changelog/224-hs-office-partner-details-rbac.sql + file: db/changelog/228-hs-office-relationship-test-data.sql - include: - file: db/changelog/226-hs-office-partner-migration.sql + file: db/changelog/230-hs-office-partner.sql - include: - file: db/changelog/228-hs-office-partner-test-data.sql + file: db/changelog/233-hs-office-partner-rbac.sql - include: - file: db/changelog/230-hs-office-relationship.sql + file: db/changelog/234-hs-office-partner-details-rbac.sql - include: - file: db/changelog/233-hs-office-relationship-rbac.sql + file: db/changelog/236-hs-office-partner-migration.sql - include: - file: db/changelog/238-hs-office-relationship-test-data.sql + file: db/changelog/238-hs-office-partner-test-data.sql - include: file: db/changelog/240-hs-office-bankaccount.sql - include: