diff --git a/src/main/resources/db/changelog/5-hs-office/503-relation/5030-hs-office-relation.sql b/src/main/resources/db/changelog/5-hs-office/503-relation/5030-hs-office-relation.sql index 1c207177..4b15674b 100644 --- a/src/main/resources/db/changelog/5-hs-office/503-relation/5030-hs-office-relation.sql +++ b/src/main/resources/db/changelog/5-hs-office/503-relation/5030-hs-office-relation.sql @@ -12,6 +12,7 @@ CREATE TYPE HsOfficeRelationType AS ENUM ( 'DEBITOR', 'VIP_CONTACT', 'OPERATIONS', + 'OPERATIONS_ALERT', 'SUBSCRIBER'); CREATE CAST (character varying as HsOfficeRelationType) WITH INOUT AS IMPLICIT; diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index 5fee84df..be27edc8 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -55,7 +55,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { "subscriber:customers-announce" }; private static final String[] KNOWN_ROLES = ArrayUtils.addAll( - new String[] { "partner", "vip-contact", "ex-partner", "billing", "contractual", "operation" }, + new String[] { "partner", "vip-contact", "ex-partner", "billing", "contractual", "operation", "silent" }, SUBSCRIBER_ROLES); // at least as the number of lines in business_partners.csv from test-data, but less than real data partner count @@ -995,6 +995,10 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { debitor.getDebitorRel().setContact(contact); } if (containsRole(rec, "operation")) { + addRelation(HsOfficeRelationType.OPERATIONS_ALERT, partnerPerson, contactPerson, contact); + addRelation(HsOfficeRelationType.OPERATIONS, partnerPerson, contactPerson, contact); + } + if (containsRole(rec, "silent")) { addRelation(HsOfficeRelationType.OPERATIONS, partnerPerson, contactPerson, contact); } if (containsRole(rec, "contractual")) {