From 2c1e96d66fab3d9037844de8fb32ccc498ec47cc Mon Sep 17 00:00:00 2001 From: Aleksander Heintz Date: Wed, 24 Jul 2024 16:05:22 +0200 Subject: [PATCH 1/2] chore: db party model --- .vscode/settings.json | 6 +- .../RegisterPersistenceExtensions.cs | 4 +- .../Migration/_draft/00-enums.sql | 26 ++ .../Migration/_draft/01-identifiers.sql | 20 ++ .../Migration/_draft/02-address.sql | 30 ++ .../Migration/_draft/03-party-table.sql | 22 ++ .../_draft/04-party-source-ref-table.sql | 11 + .../Migration/_draft/05-person-table.sql | 13 + .../_draft/06-organization-table.sql | 15 + .../Migration/v0.00-schema/00-schema.sql | 1 + .../v0.00-schema/01-default-privileges.sql | 15 +- .../[register.organization]/00-party.sql | 266 ++++++++++++++++++ .../01-organization.sql | 266 ++++++++++++++++++ 13 files changed, 678 insertions(+), 17 deletions(-) create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/00-enums.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/01-identifiers.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/02-address.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/03-party-table.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/04-party-source-ref-table.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/05-person-table.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/06-organization-table.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/TestData/[register.organization]/00-party.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/TestData/[register.organization]/01-organization.sql diff --git a/.vscode/settings.json b/.vscode/settings.json index 4776b0cb..41d06923 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,9 +12,5 @@ "BaseArtifactsPath", "ArtifactsPath", "VersionFilePath" - ], - "sqltools.format": { - "language": "sql", - "linesBetweenQueries": 2 - } + ] } diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Microsoft.Extensions.Hosting/RegisterPersistenceExtensions.cs b/src/Altinn.Register/src/Altinn.Register.Persistence/Microsoft.Extensions.Hosting/RegisterPersistenceExtensions.cs index 34ffb37d..1213067f 100644 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Microsoft.Extensions.Hosting/RegisterPersistenceExtensions.cs +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Microsoft.Extensions.Hosting/RegisterPersistenceExtensions.cs @@ -50,9 +50,9 @@ private static void AddDatabase(IHostApplicationBuilder builder) var descriptor = builder.GetAltinnServiceDescriptor(); var yuniqlSchema = builder.Configuration.GetValue($"Altinn:Npgsql:{descriptor.Name}:Yuniql:MigrationsTable:Schema"); var migrationsFs = new ManifestEmbeddedFileProvider(typeof(RegisterPersistenceExtensions).Assembly, "Migration"); - ////var seedDataFs = new ManifestEmbeddedFileProvider(typeof(RegisterPersistenceExtensions).Assembly, "TestData"); + var seedDataFs = new ManifestEmbeddedFileProvider(typeof(RegisterPersistenceExtensions).Assembly, "TestData"); builder.AddAltinnPostgresDataSource() - ////.SeedFromFileProvider(seedDataFs) + .SeedFromFileProvider(seedDataFs) .AddYuniqlMigrations(y => { y.WorkspaceFileProvider = migrationsFs; diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/00-enums.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/00-enums.sql new file mode 100644 index 00000000..c7365fe0 --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/00-enums.sql @@ -0,0 +1,26 @@ +-- Enum: register.party_type +DO $$ +BEGIN + CREATE TYPE register.party_type AS ENUM( + 'person', + 'organization' +); +EXCEPTION + WHEN duplicate_object THEN + NULL; +END +$$; + +-- Enum: register.party_source +DO $$ +BEGIN + CREATE TYPE register.party_source AS ENUM( + 'folkeregistered', + 'enhetsregisteret' +); +EXCEPTION + WHEN duplicate_object THEN + NULL; +END +$$; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/01-identifiers.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/01-identifiers.sql new file mode 100644 index 00000000..30487131 --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/01-identifiers.sql @@ -0,0 +1,20 @@ +-- Domain: register.person_identifier +DO $$ +BEGIN + CREATE DOMAIN register.person_identifier AS text CONSTRAINT fmtchk CHECK(value ~ '^[0-9]{11}$'); +EXCEPTION + WHEN duplicate_object THEN + NULL; +END +$$; + +-- Domain: register.organization_identifier +DO $$ +BEGIN + CREATE DOMAIN register.organization_identifier AS text CONSTRAINT fmtchk CHECK(value ~ '^[0-9]{9}$'); +EXCEPTION + WHEN duplicate_object THEN + NULL; +END +$$; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/02-address.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/02-address.sql new file mode 100644 index 00000000..8fcc5bb9 --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/02-address.sql @@ -0,0 +1,30 @@ +-- Composite: register._address (private - implementation detail) +DO $$ +BEGIN + CREATE TYPE register._address AS( + municipal_number text, + municipal_name text, + street_name text, + house_number text, + house_letter text, + apartment_number text, + postal_code text, + city text +); +EXCEPTION + WHEN duplicate_object THEN + NULL; +END +$$; + +-- Domain: register.address +DO $$ +BEGIN + -- No checks at this time, but create a domain so they can be added later + CREATE DOMAIN register.address AS register._address; +EXCEPTION + WHEN duplicate_object THEN + NULL; +END +$$; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/03-party-table.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/03-party-table.sql new file mode 100644 index 00000000..28421e7b --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/03-party-table.sql @@ -0,0 +1,22 @@ +-- Table: register.party +CREATE TABLE IF NOT EXISTS register.party( + uuid uuid PRIMARY KEY NOT NULL, + id bigint NOT NULL, + party_type register.party_type NOT NULL, + name text NOT NULL, + person_identifier register.person_identifier, + organization_identifier register.organization_identifier, + created timestamp with time zone NOT NULL, + updated timestamp with time zone NOT NULL, + CONSTRAINT type_identifier_check CHECK ((party_type = 'person'::register.party_type AND person_identifier IS NOT NULL AND organization_identifier IS NULL) OR (party_type = 'organization'::register.party_type AND person_identifier IS NULL AND organization_identifier IS NOT NULL)) +) +TABLESPACE pg_default; + +CREATE UNIQUE INDEX IF NOT EXISTS uq_party_uuid ON register.party(uuid) INCLUDE (id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; + +CREATE UNIQUE INDEX IF NOT EXISTS uq_party_id ON register.party(id) INCLUDE (id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; + +CREATE UNIQUE INDEX IF NOT EXISTS uq_person_identifier ON register.party(person_identifier) INCLUDE (id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; + +CREATE UNIQUE INDEX IF NOT EXISTS uq_organization_identifier ON register.party(organization_identifier) INCLUDE (id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/04-party-source-ref-table.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/04-party-source-ref-table.sql new file mode 100644 index 00000000..585c503a --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/04-party-source-ref-table.sql @@ -0,0 +1,11 @@ +-- Table: register.party_source_ref +CREATE TABLE IF NOT EXISTS register.party_source_ref( + party_uuid uuid NOT NULL REFERENCES register.party(uuid) ON DELETE CASCADE ON UPDATE CASCADE, + source register.party_source NOT NULL, + source_identifier text NOT NULL, + source_created timestamp with time zone, + source_updated timestamp with time zone, + PRIMARY KEY (party_uuid, source, source_identifier) +) +TABLESPACE pg_default; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/05-person-table.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/05-person-table.sql new file mode 100644 index 00000000..2c85ef00 --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/05-person-table.sql @@ -0,0 +1,13 @@ +-- Table: register.person +CREATE TABLE IF NOT EXISTS register.person( + uuid uuid PRIMARY KEY NOT NULL REFERENCES register.party(uuid) ON DELETE CASCADE ON UPDATE CASCADE, + first_name text NOT NULL, + middle_name text, + last_name text NOT NULL, + address register.address, + mailing_address register.address, + date_of_birth date, + date_of_death date +) +TABLESPACE pg_default; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/06-organization-table.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/06-organization-table.sql new file mode 100644 index 00000000..d713e545 --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/06-organization-table.sql @@ -0,0 +1,15 @@ +-- Table: register.organization +CREATE TABLE IF NOT EXISTS register.organization( + uuid uuid PRIMARY KEY NOT NULL REFERENCES register.party(uuid) ON DELETE CASCADE ON UPDATE CASCADE, + unit_status text, + unit_type text, + telephone_number text, + mobile_number text, + fax_number text, + email_address text, + internet_address text, + mailing_address register.address, + business_address register.address +) +TABLESPACE pg_default; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.00-schema/00-schema.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.00-schema/00-schema.sql index fbc6b796..0ab3615d 100644 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.00-schema/00-schema.sql +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.00-schema/00-schema.sql @@ -1 +1,2 @@ CREATE SCHEMA IF NOT EXISTS register; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.00-schema/01-default-privileges.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.00-schema/01-default-privileges.sql index 084b9483..b0c0ba0b 100644 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.00-schema/01-default-privileges.sql +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.00-schema/01-default-privileges.sql @@ -1,13 +1,8 @@ -- grant on tables -ALTER DEFAULT PRIVILEGES FOR USER "${YUNIQL-USER}" IN SCHEMA register -GRANT SELECT, - INSERT, - UPDATE, - REFERENCES, - DELETE, - TRUNCATE, - TRIGGER ON TABLES TO "${APP-USER}"; +ALTER DEFAULT PRIVILEGES FOR USER "${YUNIQL-USER}" IN SCHEMA register GRANT +SELECT +, INSERT, UPDATE, REFERENCES, DELETE, TRUNCATE, TRIGGER ON TABLES TO "${APP-USER}"; -- grant on sequences -ALTER DEFAULT PRIVILEGES FOR USER "${YUNIQL-USER}" IN SCHEMA register -GRANT ALL ON SEQUENCES TO "${APP-USER}"; +ALTER DEFAULT PRIVILEGES FOR USER "${YUNIQL-USER}" IN SCHEMA register GRANT ALL ON SEQUENCES TO "${APP-USER}"; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/TestData/[register.organization]/00-party.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/TestData/[register.organization]/00-party.sql new file mode 100644 index 00000000..bf16478a --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/TestData/[register.organization]/00-party.sql @@ -0,0 +1,266 @@ +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('29ad8a2a-19be-411d-a6c5-947ec5527c61'::uuid, 50004231, 'organization'::register.party_type, 'ÅSEN OG BEKKJARVIK ', NULL, '810419822', '2024-07-24 15:50:18.333938+02', '2024-07-24 15:50:18.333938+02'), +('239e3cc3-0f46-4ac0-aa0d-3e649b713953'::uuid, 50004236, 'organization'::register.party_type, 'VEIDNESKLUBBEN OG VARDØ ', NULL, '810420642', '2024-07-24 15:50:20.601762+02', '2024-07-24 15:50:20.601762+02'), +('3268353b-0a0d-40f1-9eb5-65cf02346702'::uuid, 50004244, 'organization'::register.party_type, 'SAURA OG NÆRSNES ', NULL, '810421622', '2024-07-24 15:50:20.605343+02', '2024-07-24 15:50:20.605343+02'), +('1cb69e92-50e5-4e64-b171-25c07d409f04'::uuid, 50004252, 'organization'::register.party_type, 'HERVIK OG TISTEDAL ', NULL, '810434392', '2024-07-24 15:50:20.606765+02', '2024-07-24 15:50:20.606765+02'), +('e2081abd-a16f-4302-93b0-05aaa42023e8'::uuid, 50006022, 'organization'::register.party_type, 'VÅGLAND OG LOM ', NULL, '910480081', '2024-07-24 15:50:20.607972+02', '2024-07-24 15:50:20.607972+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('4b28742a-5cd0-400e-a096-bd9817d12dca'::uuid, 50006023, 'organization'::register.party_type, 'HAUGLANDSHELLA OG FJELL', NULL, '910480103', '2024-07-24 15:50:20.608907+02', '2024-07-24 15:50:20.608907+02'), +('ad18578d-94cb-4774-8f37-5b24801c219b'::uuid, 50006024, 'organization'::register.party_type, 'FLEKKERØY OG ÅROS', NULL, '910480111', '2024-07-24 15:50:20.609986+02', '2024-07-24 15:50:20.609986+02'), +('ec09feda-5dba-4b84-ad0b-f7886e6082cd'::uuid, 50006040, 'organization'::register.party_type, 'BREIVIKBOTN OG BARKÅKER', NULL, '910480499', '2024-07-24 15:50:20.611084+02', '2024-07-24 15:50:20.611084+02'), +('06ca0613-5c5d-41dd-b20f-65f0d017b41b'::uuid, 50006025, 'organization'::register.party_type, 'TORVASTAD OG GODØYSUND ', NULL, '910480138', '2024-07-24 15:50:20.612063+02', '2024-07-24 15:50:20.612063+02'), +('2d1a79f5-e79e-4f39-acd2-e669115c27eb'::uuid, 50006026, 'organization'::register.party_type, 'NORDDAL OG OLDERVIK', NULL, '910480154', '2024-07-24 15:50:20.612901+02', '2024-07-24 15:50:20.612901+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('c28daaae-e64f-4f07-9cfe-7fb5428263b9'::uuid, 50006027, 'organization'::register.party_type, 'DEGERNES OG LISMARKA', NULL, '910480189', '2024-07-24 15:50:20.613696+02', '2024-07-24 15:50:20.613696+02'), +('eb459c21-4d07-462a-bb49-be4667042519'::uuid, 50006028, 'organization'::register.party_type, 'KVAMMEN OG LONGVA', NULL, '910480200', '2024-07-24 15:50:20.614443+02', '2024-07-24 15:50:20.614443+02'), +('3456aeb0-f771-43e8-b30e-f8c5a919a808'::uuid, 51197709, 'organization'::register.party_type, 'AKUSTISK HUMORISTISK TIGER AS', NULL, '310137448', '2024-07-24 15:50:20.615339+02', '2024-07-24 15:50:20.615339+02'), +('8ea13a49-c7dd-4038-8dee-65eae54ccfa7'::uuid, 51690244, 'organization'::register.party_type, 'TANKEFULL INNBRINGENDE FJELLREV', NULL, '315773717', '2024-07-24 15:50:20.616312+02', '2024-07-24 15:50:20.616312+02'), +('52c41755-bb31-41e6-b0cf-26e165275e9f'::uuid, 51690245, 'organization'::register.party_type, 'HUSLØS HÅNDFAST FJELLREV', NULL, '315773725', '2024-07-24 15:50:20.617133+02', '2024-07-24 15:50:20.617133+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('484bb095-3c91-44f5-ac42-43b2184160f4'::uuid, 51130746, 'organization'::register.party_type, 'HES LYS KAIMAN HF', NULL, '310195936', '2024-07-24 15:50:20.621186+02', '2024-07-24 15:50:20.621186+02'), +('2be8b561-d608-44b6-90b9-7ad507f18cf7'::uuid, 51130745, 'organization'::register.party_type, 'DOGMATISK ENGASJERT FJELLREV', NULL, '211654392', '2024-07-24 15:50:20.622195+02', '2024-07-24 15:50:20.622195+02'), +('054042b1-41cd-4887-b4b6-d7f13b01f7c8'::uuid, 51130747, 'organization'::register.party_type, 'UGLESETT FATTET FJELLREV', NULL, '211654422', '2024-07-24 15:50:20.62303+02', '2024-07-24 15:50:20.62303+02'), +('9701c6f9-8a5c-4d66-80d4-dfa592aba2de'::uuid, 51130748, 'organization'::register.party_type, 'EGOISTISK RAKRYGGET FJELLREV', NULL, '211654872', '2024-07-24 15:50:20.623799+02', '2024-07-24 15:50:20.623799+02'), +('b006ee54-fe5f-4ec2-a506-efc6538fdc33'::uuid, 51130749, 'organization'::register.party_type, 'REFLEKTERENDE GOD FJELLREV', NULL, '211654562', '2024-07-24 15:50:20.624767+02', '2024-07-24 15:50:20.624767+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('308af25c-90d4-4605-b624-bb244eb054f2'::uuid, 51130750, 'organization'::register.party_type, 'PÅPASSELIG REFLEKSIV FJELLREV', NULL, '211654902', '2024-07-24 15:50:20.625968+02', '2024-07-24 15:50:20.625968+02'), +('2ca597ef-56bd-4168-ba5c-ffc9627f4418'::uuid, 51130751, 'organization'::register.party_type, 'VÅKEN INITIATIVRIK FJELLREV', NULL, '211654732', '2024-07-24 15:50:20.626842+02', '2024-07-24 15:50:20.626842+02'), +('c6caa88b-1c7b-4020-8c23-508c0754fe11'::uuid, 51130752, 'organization'::register.party_type, 'OPPFYLLENDE ARITMETISK FJELLREV', NULL, '211654252', '2024-07-24 15:50:20.627719+02', '2024-07-24 15:50:20.627719+02'), +('5939c7a2-44b3-4d86-b955-931f551da3a2'::uuid, 51130753, 'organization'::register.party_type, 'GRÅ OPPFYLLENDE FJELLREV', NULL, '211655062', '2024-07-24 15:50:20.628598+02', '2024-07-24 15:50:20.628598+02'), +('72c91500-7c6a-4613-ad4e-a1e16aba6acf'::uuid, 51130754, 'organization'::register.party_type, 'LITT ENGASJERT FJELLREV', NULL, '211655232', '2024-07-24 15:50:20.629502+02', '2024-07-24 15:50:20.629502+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('06a2c4c6-01e7-487a-a910-97d6bf03eaa4'::uuid, 51355240, 'organization'::register.party_type, 'FANTASILØS FRISK FJELLREV', NULL, '311654209', '2024-07-24 15:50:20.630349+02', '2024-07-24 15:50:20.630349+02'), +('e9e19980-b6c9-41f2-9465-e119f808acfa'::uuid, 51355241, 'organization'::register.party_type, 'KLAM RETORISK FJELLREV', NULL, '311654217', '2024-07-24 15:50:20.631104+02', '2024-07-24 15:50:20.631104+02'), +('34d9cfe9-04f6-478b-918f-e5d38958bfb3'::uuid, 51355242, 'organization'::register.party_type, 'VÅKEN EKSEMPLARISK FJELLREV', NULL, '311654225', '2024-07-24 15:50:20.631877+02', '2024-07-24 15:50:20.631877+02'), +('187c1828-c7bf-464c-90f2-78fc09bb08c1'::uuid, 51355243, 'organization'::register.party_type, 'GRETTEN UAVHENGIG FJELLREV', NULL, '311654233', '2024-07-24 15:50:20.632821+02', '2024-07-24 15:50:20.632821+02'), +('4f52b835-eeb5-48c8-9bae-b931bf0f6bca'::uuid, 51355244, 'organization'::register.party_type, 'TREKANTET KRITISK FJELLREV', NULL, '311654241', '2024-07-24 15:50:20.63368+02', '2024-07-24 15:50:20.63368+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('d7c25b47-c691-422c-93d1-54782c4a11d4'::uuid, 51355245, 'organization'::register.party_type, 'IHERDIG UVANLIG FJELLREV', NULL, '311654268', '2024-07-24 15:50:20.634482+02', '2024-07-24 15:50:20.634482+02'), +('81373a37-74ca-4b97-bdaf-9243f59f952f'::uuid, 51355246, 'organization'::register.party_type, 'KONGE SART FJELLREV', NULL, '311654276', '2024-07-24 15:50:20.635303+02', '2024-07-24 15:50:20.635303+02'), +('1eabfd3c-7020-49bf-8221-869ffba964bf'::uuid, 51355247, 'organization'::register.party_type, 'IHERDIG HELLIG FJELLREV', NULL, '311654284', '2024-07-24 15:50:20.636075+02', '2024-07-24 15:50:20.636075+02'), +('115e84f4-b41e-40e4-9a6e-49808b0fa6f7'::uuid, 51355248, 'organization'::register.party_type, 'ERFAREN KONGE FJELLREV', NULL, '311654292', '2024-07-24 15:50:20.636836+02', '2024-07-24 15:50:20.636836+02'), +('427ceb9a-8820-431d-afff-db9dcd8294fa'::uuid, 51355249, 'organization'::register.party_type, 'TOM SKY FJELLREV', NULL, '311654306', '2024-07-24 15:50:20.637699+02', '2024-07-24 15:50:20.637699+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('0c81a5ef-b894-403b-b005-2d2b0353e2c4'::uuid, 51355250, 'organization'::register.party_type, 'SOLID DEILIG FJELLREV', NULL, '311654314', '2024-07-24 15:50:20.638536+02', '2024-07-24 15:50:20.638536+02'), +('c2a90dd9-4f93-4a75-a447-d9d58e42d910'::uuid, 51355251, 'organization'::register.party_type, 'GJENNOMSIKTIG UMAKE FJELLREV', NULL, '311654322', '2024-07-24 15:50:20.639441+02', '2024-07-24 15:50:20.639441+02'), +('0dd7e44a-202c-4069-b0c5-87f84f88be19'::uuid, 51355252, 'organization'::register.party_type, 'SØVNIG UPRESIS FJELLREV', NULL, '311654330', '2024-07-24 15:50:20.640303+02', '2024-07-24 15:50:20.640303+02'), +('5eabab58-2091-4063-8ef4-c0551a43fdfa'::uuid, 51355253, 'organization'::register.party_type, 'ANALYSERENDE SVIMMEL FJELLREV', NULL, '311654349', '2024-07-24 15:50:20.641204+02', '2024-07-24 15:50:20.641204+02'), +('24c6960b-2919-4ca0-bb85-a18c63370558'::uuid, 51355254, 'organization'::register.party_type, 'DIREKTE USYMMETRISK FJELLREV', NULL, '311654365', '2024-07-24 15:50:20.64216+02', '2024-07-24 15:50:20.64216+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('183a65e3-256e-41dc-906d-996551c4400d'::uuid, 51355255, 'organization'::register.party_type, 'GREI BESTEMT FJELLREV', NULL, '311654357', '2024-07-24 15:50:20.642993+02', '2024-07-24 15:50:20.642993+02'), +('2bfdf206-9c64-48d5-a9e9-ee3953a7b635'::uuid, 51355256, 'organization'::register.party_type, 'SAKTE GILD FJELLREV', NULL, '311654373', '2024-07-24 15:50:20.643808+02', '2024-07-24 15:50:20.643808+02'), +('b05ed16f-3ba4-4732-8967-f69d2f9a8abf'::uuid, 51355257, 'organization'::register.party_type, 'SANNFERDIG PARAT FJELLREV', NULL, '311654381', '2024-07-24 15:50:20.644654+02', '2024-07-24 15:50:20.644654+02'), +('75a8bd4b-4326-44a5-92c6-aa46da3df06c'::uuid, 51355258, 'organization'::register.party_type, 'OVERSIKTLIG FREIDIG FJELLREV', NULL, '311654403', '2024-07-24 15:50:20.645485+02', '2024-07-24 15:50:20.645485+02'), +('ec175cf4-81a8-47e7-9343-43f34eed1e2c'::uuid, 51355259, 'organization'::register.party_type, 'STA TOPP FJELLREV', NULL, '311654411', '2024-07-24 15:50:20.646349+02', '2024-07-24 15:50:20.646349+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('ea5d86ac-f54c-4062-a1bf-faaeb19647ef'::uuid, 51355260, 'organization'::register.party_type, 'MODERAT FYSISK FJELLREV', NULL, '311654446', '2024-07-24 15:50:20.647203+02', '2024-07-24 15:50:20.647203+02'), +('f3c3fc11-7c77-4fd1-b45d-66766f76a313'::uuid, 51355261, 'organization'::register.party_type, 'NATURLIG ARTIG FJELLREV', NULL, '311654438', '2024-07-24 15:50:20.648079+02', '2024-07-24 15:50:20.648079+02'), +('b512df33-5e08-4ebf-b8d5-58503ffc336f'::uuid, 51355262, 'organization'::register.party_type, 'ØVRIG KREATIV FJELLREV', NULL, '311654454', '2024-07-24 15:50:20.648905+02', '2024-07-24 15:50:20.648905+02'), +('587d7381-90dd-4056-b81b-13c60d374882'::uuid, 51355263, 'organization'::register.party_type, 'UTMERKET DYKTIG FJELLREV', NULL, '311654462', '2024-07-24 15:50:20.649736+02', '2024-07-24 15:50:20.649736+02'), +('1690da3d-4656-4502-a95d-3221f6b8d772'::uuid, 51355264, 'organization'::register.party_type, 'STILLE RIK FJELLREV', NULL, '311654470', '2024-07-24 15:50:20.650595+02', '2024-07-24 15:50:20.650595+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('708117e3-e5f1-4154-8f57-0e95b6228742'::uuid, 51355265, 'organization'::register.party_type, 'SPRUDLENDE TRU FJELLREV', NULL, '311654497', '2024-07-24 15:50:20.651434+02', '2024-07-24 15:50:20.651434+02'), +('71ee56bd-230b-4b05-bfc4-46b0ea365f91'::uuid, 51355266, 'organization'::register.party_type, 'UGLESETT TILGIVENDE FJELLREV', NULL, '311654489', '2024-07-24 15:50:20.652188+02', '2024-07-24 15:50:20.652188+02'), +('37b140ba-b84e-485b-b2e6-12c17fac5454'::uuid, 51355267, 'organization'::register.party_type, 'TREKANTET OBSERVANT FJELLREV', NULL, '311654500', '2024-07-24 15:50:20.652939+02', '2024-07-24 15:50:20.652939+02'), +('7f80964d-c197-4200-8427-715dab480562'::uuid, 51355268, 'organization'::register.party_type, 'ALVORLIG TREKANTET FJELLREV', NULL, '311654519', '2024-07-24 15:50:20.653777+02', '2024-07-24 15:50:20.653777+02'), +('94aec3d7-9dd8-4cd4-a2f9-89c161d1032b'::uuid, 51355269, 'organization'::register.party_type, 'SIKKER UTYDELIG FJELLREV', NULL, '311654527', '2024-07-24 15:50:20.654501+02', '2024-07-24 15:50:20.654501+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('9514930a-9955-4a54-9391-ba3b7d04f03d'::uuid, 51355270, 'organization'::register.party_type, 'BLAUT FIRKANTET FJELLREV', NULL, '311654535', '2024-07-24 15:50:20.65541+02', '2024-07-24 15:50:20.65541+02'), +('12088b83-1b8a-4590-8fea-57d185566ded'::uuid, 51355271, 'organization'::register.party_type, 'NESTE SAMLET FJELLREV', NULL, '311654543', '2024-07-24 15:50:20.656398+02', '2024-07-24 15:50:20.656398+02'), +('47cbe016-9fe6-4cc4-91e7-ab54d4a0e229'::uuid, 51355272, 'organization'::register.party_type, 'UTÅLMODIG FANTASIFULL FJELLREV', NULL, '311654551', '2024-07-24 15:50:20.657502+02', '2024-07-24 15:50:20.657502+02'), +('81352583-7f3a-4c30-9f73-340c08d4f980'::uuid, 51355273, 'organization'::register.party_type, 'GRÅ UNØYAKTIG FJELLREV', NULL, '311654578', '2024-07-24 15:50:20.658413+02', '2024-07-24 15:50:20.658413+02'), +('8bc51893-35bd-4325-b8e5-53740367e911'::uuid, 51355274, 'organization'::register.party_type, 'TILFELDIG ORANSJE FJELLREV', NULL, '311654586', '2024-07-24 15:50:20.659266+02', '2024-07-24 15:50:20.659266+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('3871f548-3a4c-420b-ba78-5bb40d3feaab'::uuid, 51355275, 'organization'::register.party_type, 'REAL RASK FJELLREV', NULL, '311654594', '2024-07-24 15:50:20.660267+02', '2024-07-24 15:50:20.660267+02'), +('9922fc05-decc-43df-a659-8414b0b31fbb'::uuid, 51355276, 'organization'::register.party_type, 'USIKKER OVERSIKTLIG FJELLREV', NULL, '311654608', '2024-07-24 15:50:20.661117+02', '2024-07-24 15:50:20.661117+02'), +('107c341c-a378-4bda-80f4-510647bf4b18'::uuid, 51355277, 'organization'::register.party_type, 'LITT OMTENKSOM FJELLREV', NULL, '311654616', '2024-07-24 15:50:20.661997+02', '2024-07-24 15:50:20.661997+02'), +('d3a2b092-457d-4014-a0ec-3429660630b8'::uuid, 51355278, 'organization'::register.party_type, 'MANGE FORSTANDIG FJELLREV', NULL, '311654624', '2024-07-24 15:50:20.662861+02', '2024-07-24 15:50:20.662861+02'), +('70c75760-a9b2-4960-840b-b0f4ba674550'::uuid, 51355279, 'organization'::register.party_type, 'ALTETENDE KURSIV FJELLREV', NULL, '311654632', '2024-07-24 15:50:20.663684+02', '2024-07-24 15:50:20.663684+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('bfd5b29e-cdd1-4af8-bfcf-3a8eae2c777b'::uuid, 51355280, 'organization'::register.party_type, 'USYMMETRISK AKADEMISK FJELLREV', NULL, '311654640', '2024-07-24 15:50:20.664627+02', '2024-07-24 15:50:20.664627+02'), +('c047c90e-6a98-417c-be12-97b593ed3a51'::uuid, 51355281, 'organization'::register.party_type, 'LENGRE RETTFERDIG FJELLREV', NULL, '311654659', '2024-07-24 15:50:20.665476+02', '2024-07-24 15:50:20.665476+02'), +('aca19de1-870d-4ba4-b090-5c29a1a339ad'::uuid, 51355282, 'organization'::register.party_type, 'LATTERMILD LAV FJELLREV', NULL, '311654667', '2024-07-24 15:50:20.666359+02', '2024-07-24 15:50:20.666359+02'), +('700b04f8-eec1-40ca-a1f8-d547d0360a07'::uuid, 51355283, 'organization'::register.party_type, 'SKRAVLETE USIKKER FJELLREV', NULL, '311654675', '2024-07-24 15:50:20.667248+02', '2024-07-24 15:50:20.667248+02'), +('bcfada41-1ea5-4281-9dfe-efb8570a9fbc'::uuid, 51355284, 'organization'::register.party_type, 'USYMMETRISK ORIENTAL FJELLREV', NULL, '311654683', '2024-07-24 15:50:20.668068+02', '2024-07-24 15:50:20.668068+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('cedcba81-5c20-4893-b425-c5a13d1f48d1'::uuid, 51355285, 'organization'::register.party_type, 'BRA PÅPASSELIG FJELLREV', NULL, '311654691', '2024-07-24 15:50:20.668925+02', '2024-07-24 15:50:20.668925+02'), +('058a75db-fbe0-4cf9-b2b8-097d0556c4fe'::uuid, 51355286, 'organization'::register.party_type, 'SENTRAL STRAFFET FJELLREV', NULL, '311654705', '2024-07-24 15:50:20.669825+02', '2024-07-24 15:50:20.669825+02'), +('39667992-6b42-47f2-9254-29362ed4420c'::uuid, 51355287, 'organization'::register.party_type, 'RAFFINERT BESKJEDEN FJELLREV', NULL, '311654713', '2024-07-24 15:50:20.67079+02', '2024-07-24 15:50:20.67079+02'), +('94bf8cfa-506f-4ef2-8ae5-3c470e2b550d'::uuid, 51355288, 'organization'::register.party_type, 'GJENSIDIG JORDNÆR FJELLREV', NULL, '311654721', '2024-07-24 15:50:20.671596+02', '2024-07-24 15:50:20.671596+02'), +('7e9c8439-5f0c-4e2e-b492-b0b678976fd5'::uuid, 51355289, 'organization'::register.party_type, 'VÅKEN STYRBAR FJELLREV', NULL, '311654748', '2024-07-24 15:50:20.672524+02', '2024-07-24 15:50:20.672524+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('89989c17-c04c-49f5-a8d5-24aee4b5009a'::uuid, 51355290, 'organization'::register.party_type, 'PRAGMATISK STRAFFET FJELLREV', NULL, '311654756', '2024-07-24 15:50:20.673408+02', '2024-07-24 15:50:20.673408+02'), +('8f9ed624-393d-4511-a7c4-6e7fa3bf4404'::uuid, 51355291, 'organization'::register.party_type, 'TREIG UMODEN FJELLREV', NULL, '311654764', '2024-07-24 15:50:20.674449+02', '2024-07-24 15:50:20.674449+02'), +('34845a9e-c018-4757-a074-f87221b9c138'::uuid, 51355292, 'organization'::register.party_type, 'TAKTFULL VISSEN FJELLREV', NULL, '311654772', '2024-07-24 15:50:20.675453+02', '2024-07-24 15:50:20.675453+02'), +('94576f3f-2db0-4bc1-9533-6e392791c192'::uuid, 51355293, 'organization'::register.party_type, 'MEMORERENDE SENTRAL FJELLREV', NULL, '311654780', '2024-07-24 15:50:20.676688+02', '2024-07-24 15:50:20.676688+02'), +('75ae06b3-bed6-4374-ad31-c5e9453db754'::uuid, 51355294, 'organization'::register.party_type, 'FORETAKSOM TAPPER FJELLREV', NULL, '311654799', '2024-07-24 15:50:20.677803+02', '2024-07-24 15:50:20.677803+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('c7868e84-f66c-4eaf-a565-dc91e85b02c0'::uuid, 51355295, 'organization'::register.party_type, 'TRIST PEN FJELLREV', NULL, '311654810', '2024-07-24 15:50:20.678988+02', '2024-07-24 15:50:20.678988+02'), +('96fe9992-a10d-49f0-adef-e65e85154ffb'::uuid, 51355296, 'organization'::register.party_type, 'MATEMATISK SORGLØS FJELLREV', NULL, '311654802', '2024-07-24 15:50:20.680185+02', '2024-07-24 15:50:20.680185+02'), +('0d982c80-fc8f-40d0-90a0-574de74f3eaa'::uuid, 51355297, 'organization'::register.party_type, 'KONVENSJONELL VAKKER FJELLREV', NULL, '311654829', '2024-07-24 15:50:20.681247+02', '2024-07-24 15:50:20.681247+02'), +('1bf615ee-61f5-4c57-a53a-d9bb55ed5a75'::uuid, 51355298, 'organization'::register.party_type, 'KOMPLEKS ULTRAFIOLETT FJELLREV', NULL, '311654837', '2024-07-24 15:50:20.682379+02', '2024-07-24 15:50:20.682379+02'), +('c40ee674-832b-4125-80ed-861f02743e36'::uuid, 51355299, 'organization'::register.party_type, 'HÅRSÅR UFORNUFTIG FJELLREV', NULL, '311654845', '2024-07-24 15:50:20.683441+02', '2024-07-24 15:50:20.683441+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('05a123cb-31e5-4544-b74e-0b1f09adf681'::uuid, 51355300, 'organization'::register.party_type, 'SIGEN PUNKTLIG FJELLREV', NULL, '311654853', '2024-07-24 15:50:20.684493+02', '2024-07-24 15:50:20.684493+02'), +('2d6f5724-4d33-4fe4-a3d1-305ed1e84f73'::uuid, 51355301, 'organization'::register.party_type, 'FRYKTLØS PARISK FJELLREV', NULL, '311654861', '2024-07-24 15:50:20.685556+02', '2024-07-24 15:50:20.685556+02'), +('3978e117-4a3c-4566-8418-41fb2d87ad97'::uuid, 51355302, 'organization'::register.party_type, 'LYSELILLA FILOSOFISK FJELLREV', NULL, '311654888', '2024-07-24 15:50:20.686665+02', '2024-07-24 15:50:20.686665+02'), +('ce24b30c-e7c9-400e-8bba-4c2a36e2c2cf'::uuid, 51355303, 'organization'::register.party_type, 'SAKTE TILBAKEHOLDEN FJELLREV', NULL, '311654896', '2024-07-24 15:50:20.687882+02', '2024-07-24 15:50:20.687882+02'), +('dcdf7526-28de-4c6a-bd36-2cca6f50cb4c'::uuid, 51355304, 'organization'::register.party_type, 'HISTORISK EPISK FJELLREV', NULL, '311654918', '2024-07-24 15:50:20.688992+02', '2024-07-24 15:50:20.688992+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('143f6893-771d-4fa0-b451-8c5fefdbeed0'::uuid, 51355305, 'organization'::register.party_type, 'SALIG IHERDIG FJELLREV', NULL, '311654926', '2024-07-24 15:50:20.690032+02', '2024-07-24 15:50:20.690032+02'), +('d89ee79e-fc03-4bd6-8e2f-a4a47a92dfc1'::uuid, 51355306, 'organization'::register.party_type, 'KVART MOBIL FJELLREV', NULL, '311654934', '2024-07-24 15:50:20.691026+02', '2024-07-24 15:50:20.691026+02'), +('96309092-59d1-40f9-a345-d5324a428a1c'::uuid, 51355307, 'organization'::register.party_type, 'SIVILISERT SIST FJELLREV', NULL, '311654942', '2024-07-24 15:50:20.692+02', '2024-07-24 15:50:20.692+02'), +('07b8aff3-2732-42da-9a6f-283dbfb0f4d7'::uuid, 51355308, 'organization'::register.party_type, 'NYTTIG SEIN FJELLREV', NULL, '311654969', '2024-07-24 15:50:20.692929+02', '2024-07-24 15:50:20.692929+02'), +('8dfa654f-7e6c-4012-ad54-dac5c70625a9'::uuid, 51355309, 'organization'::register.party_type, 'PRATSOM SNÅL FJELLREV', NULL, '311654950', '2024-07-24 15:50:20.693951+02', '2024-07-24 15:50:20.693951+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('2156d85f-3fc3-40c5-aa68-7d20f872e707'::uuid, 51355310, 'organization'::register.party_type, 'SKAPENDE HUSLØS FJELLREV', NULL, '311654977', '2024-07-24 15:50:20.69494+02', '2024-07-24 15:50:20.69494+02'), +('5c0beb8d-7a74-4fcf-b72c-0334330e8d91'::uuid, 51355311, 'organization'::register.party_type, 'BLAUT ANSTENDIG FJELLREV', NULL, '311654985', '2024-07-24 15:50:20.695869+02', '2024-07-24 15:50:20.695869+02'), +('3e6eaada-0903-4e36-9731-53cfd6e17507'::uuid, 51355312, 'organization'::register.party_type, 'ULASTELIG AUTORISERT FJELLREV', NULL, '311654993', '2024-07-24 15:50:20.696794+02', '2024-07-24 15:50:20.696794+02'), +('486311d8-2b61-46bd-ad0d-fa70c91bb21e'::uuid, 51355313, 'organization'::register.party_type, 'MOTIVERT RU FJELLREV', NULL, '311655019', '2024-07-24 15:50:20.697701+02', '2024-07-24 15:50:20.697701+02'), +('7f0b6ae5-3dc3-43a6-959b-5d7b45460703'::uuid, 51355314, 'organization'::register.party_type, 'GLAD INKLUDERENDE FJELLREV', NULL, '311655000', '2024-07-24 15:50:20.698702+02', '2024-07-24 15:50:20.698702+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('494c9c1b-338f-43b6-9219-aaab3db328b7'::uuid, 51355315, 'organization'::register.party_type, 'SLAPP KNUSLETE FJELLREV', NULL, '311655027', '2024-07-24 15:50:20.699748+02', '2024-07-24 15:50:20.699748+02'), +('2bd05568-c303-4672-a60f-5bd6e56a98c8'::uuid, 51355316, 'organization'::register.party_type, 'OPPFYLLENDE UNGT FJELLREV', NULL, '311655035', '2024-07-24 15:50:20.700711+02', '2024-07-24 15:50:20.700711+02'), +('0237e5e6-fd34-4353-8d34-15b647cc1619'::uuid, 51355317, 'organization'::register.party_type, 'OBSERVANT OFFISIELL FJELLREV', NULL, '311655043', '2024-07-24 15:50:20.701817+02', '2024-07-24 15:50:20.701817+02'), +('4b4a29e3-d8a8-42e6-a3aa-dcdf9c186c7e'::uuid, 51355318, 'organization'::register.party_type, 'MODERAT ÅPEN FJELLREV', NULL, '311655051', '2024-07-24 15:50:20.702927+02', '2024-07-24 15:50:20.702927+02'), +('6d639164-ec75-43f5-be54-4311043f4630'::uuid, 51355319, 'organization'::register.party_type, 'DRIFTIG TRIST FJELLREV', NULL, '311655078', '2024-07-24 15:50:20.704052+02', '2024-07-24 15:50:20.704052+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('c1f5259a-a54b-48ca-9462-784e153eaacf'::uuid, 51355320, 'organization'::register.party_type, 'UTÅLMODIG UMAKE FJELLREV', NULL, '311655086', '2024-07-24 15:50:20.705005+02', '2024-07-24 15:50:20.705005+02'), +('03681d95-47fb-40c2-b81c-b8a7e86a4824'::uuid, 51355321, 'organization'::register.party_type, 'KJENT OPPBLÅST FJELLREV', NULL, '311655108', '2024-07-24 15:50:20.706069+02', '2024-07-24 15:50:20.706069+02'), +('e7d453a4-2052-4a2a-b0a1-95439c9d5559'::uuid, 51355322, 'organization'::register.party_type, 'GRATIS GNIEN FJELLREV', NULL, '311655094', '2024-07-24 15:50:20.707069+02', '2024-07-24 15:50:20.707069+02'), +('cc53cd44-f43a-4a57-86d9-6487de742a01'::uuid, 51355323, 'organization'::register.party_type, 'UTGÅTT MOTSTANDSDYKTIG FJELLREV', NULL, '311655116', '2024-07-24 15:50:20.707979+02', '2024-07-24 15:50:20.707979+02'), +('104b63e0-a98d-40b2-882b-185f53827c25'::uuid, 51355324, 'organization'::register.party_type, 'OPPFARENDE FIOLETT FJELLREV', NULL, '311655124', '2024-07-24 15:50:20.708948+02', '2024-07-24 15:50:20.708948+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('c11a862a-a087-42c2-9454-0fae22af3254'::uuid, 51355325, 'organization'::register.party_type, 'OVEREKSPONERT VÅKEN FJELLREV', NULL, '311655132', '2024-07-24 15:50:20.709798+02', '2024-07-24 15:50:20.709798+02'), +('f136ffc3-bcc8-4615-a0d5-5ef1ce922f8f'::uuid, 51355326, 'organization'::register.party_type, 'KJÆRLIG SØVNIG FJELLREV', NULL, '311655140', '2024-07-24 15:50:20.710662+02', '2024-07-24 15:50:20.710662+02'), +('aafb3ef3-6e72-48ca-afd0-8817d0472ec5'::uuid, 51355327, 'organization'::register.party_type, 'VARSOM FLINK FJELLREV', NULL, '311655159', '2024-07-24 15:50:20.711491+02', '2024-07-24 15:50:20.711491+02'), +('3dcad59c-c0e3-477f-9ff2-560abc4fa4c8'::uuid, 51355328, 'organization'::register.party_type, 'FROM STABIL FJELLREV', NULL, '311655167', '2024-07-24 15:50:20.712292+02', '2024-07-24 15:50:20.712292+02'), +('3875e025-a04f-4ed2-bdbb-9bd8a19b0470'::uuid, 51355329, 'organization'::register.party_type, 'UKONTROVERSIELL ETTERPÅKLOK FJELLREV', NULL, '311655183', '2024-07-24 15:50:20.713305+02', '2024-07-24 15:50:20.713305+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('f1a26d17-8052-4a99-a6ba-565116752ef3'::uuid, 51355330, 'organization'::register.party_type, 'OBSERVANT MEDGJØRLIG FJELLREV', NULL, '311655175', '2024-07-24 15:50:20.714249+02', '2024-07-24 15:50:20.714249+02'), +('15e206ff-f62f-4ab0-9f3f-bc1e362142f5'::uuid, 51355331, 'organization'::register.party_type, 'GJENNOMSIKTIG SELVHJULPEN FJELLREV', NULL, '311655191', '2024-07-24 15:50:20.715207+02', '2024-07-24 15:50:20.715207+02'), +('47b57fbd-c1e3-4e94-b242-022ee23049da'::uuid, 51355332, 'organization'::register.party_type, 'HENSYNSFULL AKTVERDIG FJELLREV', NULL, '311655205', '2024-07-24 15:50:20.716271+02', '2024-07-24 15:50:20.716271+02'), +('8c337033-c1aa-4dd4-8fb0-ae5f47f54317'::uuid, 51355333, 'organization'::register.party_type, 'OPPLYST STERK FJELLREV', NULL, '311655213', '2024-07-24 15:50:20.717298+02', '2024-07-24 15:50:20.717298+02'), +('96a51c3c-9c7c-4e26-80d9-93b1d38ee692'::uuid, 51355334, 'organization'::register.party_type, 'LEDENDE TRU FJELLREV', NULL, '311655221', '2024-07-24 15:50:20.718649+02', '2024-07-24 15:50:20.718649+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('35c33858-4e44-4d8e-a2fc-751f01fc4e17'::uuid, 51355335, 'organization'::register.party_type, 'LEKKER SPRUDLENDE FJELLREV', NULL, '311655248', '2024-07-24 15:50:20.719633+02', '2024-07-24 15:50:20.719633+02'), +('57b263f1-6627-4ffe-86b7-187bfd7b11cc'::uuid, 51355336, 'organization'::register.party_type, 'KULTURELL SITRONGUL FJELLREV', NULL, '311655256', '2024-07-24 15:50:20.720529+02', '2024-07-24 15:50:20.720529+02'), +('5701057f-ceb7-4fb9-b584-3fe29ab8f623'::uuid, 51355337, 'organization'::register.party_type, 'FANTASILØS LUN FJELLREV', NULL, '311655264', '2024-07-24 15:50:20.721414+02', '2024-07-24 15:50:20.721414+02'), +('0e5af2b1-36a3-488e-addf-882e0584d102'::uuid, 51355338, 'organization'::register.party_type, 'KOMPLETT KONSEKVENT FJELLREV', NULL, '311655272', '2024-07-24 15:50:20.722331+02', '2024-07-24 15:50:20.722331+02'), +('a8bb2844-7c50-43d2-9f97-f85ee5b5f42d'::uuid, 51355339, 'organization'::register.party_type, 'SOLID USYMMETRISK FJELLREV', NULL, '311655280', '2024-07-24 15:50:20.723325+02', '2024-07-24 15:50:20.723325+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('1c6facc0-256b-4c35-b245-f10f114d9fdb'::uuid, 51355340, 'organization'::register.party_type, 'VENNLIG FJONG FJELLREV', NULL, '311655299', '2024-07-24 15:50:20.724192+02', '2024-07-24 15:50:20.724192+02'), +('348b3f99-6cf2-42ed-bfc8-82baf2a486cf'::uuid, 51355341, 'organization'::register.party_type, 'KONVENSJONELL PERSONLIG FJELLREV', NULL, '311655302', '2024-07-24 15:50:20.725113+02', '2024-07-24 15:50:20.725113+02'), +('3de1641d-db1c-4a96-8602-75fac8e7c0ea'::uuid, 51355342, 'organization'::register.party_type, 'FORMBAR SPISS FJELLREV', NULL, '311655310', '2024-07-24 15:50:20.725925+02', '2024-07-24 15:50:20.725925+02'), +('12806cfe-3604-4c40-b941-e85ff9af1621'::uuid, 51122072, 'organization'::register.party_type, 'SJOKKERT KOMPETENT BJØRN KOMMUNE', NULL, '313105490', '2024-07-24 15:50:20.727623+02', '2024-07-24 15:50:20.727623+02'), +('715df08b-56fb-4b3d-9b8b-e278e6a0e5fd'::uuid, 51162788, 'organization'::register.party_type, 'VERTIKAL ARTIG FJELLREV', NULL, '214574942', '2024-07-24 15:50:20.728512+02', '2024-07-24 15:50:20.728512+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('a990e084-51dd-4ffd-96ff-f8f04290ef1d'::uuid, 51162789, 'organization'::register.party_type, 'UFORNUFTIG TANKEFULL FJELLREV', NULL, '214575132', '2024-07-24 15:50:20.729306+02', '2024-07-24 15:50:20.729306+02'), +('5b16e766-60c0-4314-acd2-995a415757ca'::uuid, 51581260, 'organization'::register.party_type, 'UMODEN OPPRETT FJELLREV', NULL, '314574931', '2024-07-24 15:50:20.730113+02', '2024-07-24 15:50:20.730113+02'), +('8c54a744-7504-4651-bfb5-a2d4dd50c9db'::uuid, 51581263, 'organization'::register.party_type, 'SUNN PERFEKT FJELLREV', NULL, '314574958', '2024-07-24 15:50:20.731+02', '2024-07-24 15:50:20.731+02'), +('34192bc0-9b44-41e1-b11b-3f3ec03c3b52'::uuid, 51581264, 'organization'::register.party_type, 'TOÅRIG PLEIENDE FJELLREV', NULL, '314574966', '2024-07-24 15:50:20.732099+02', '2024-07-24 15:50:20.732099+02'), +('220188c5-a0ed-4e74-b76d-4ce5236fc8b7'::uuid, 51581265, 'organization'::register.party_type, 'NETT SPISS FJELLREV', NULL, '314574982', '2024-07-24 15:50:20.73308+02', '2024-07-24 15:50:20.73308+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('05b02ba0-763f-4971-bf47-14a1cbe3e455'::uuid, 51581266, 'organization'::register.party_type, 'MODERAT DYKTIG FJELLREV', NULL, '314574974', '2024-07-24 15:50:20.734113+02', '2024-07-24 15:50:20.734113+02'), +('34ec8440-dada-4338-b19d-b51b483c3206'::uuid, 51581267, 'organization'::register.party_type, 'DJERV KONSENTRISK FJELLREV', NULL, '314574990', '2024-07-24 15:50:20.735057+02', '2024-07-24 15:50:20.735057+02'), +('72d9fa0e-ccb7-4fe0-b4a7-f0649e15c909'::uuid, 51581268, 'organization'::register.party_type, 'LEI PUSLETE FJELLREV', NULL, '314575008', '2024-07-24 15:50:20.73596+02', '2024-07-24 15:50:20.73596+02'), +('93937daa-8459-4f59-b318-d11054479d2c'::uuid, 51581269, 'organization'::register.party_type, 'NØDVENDIG JURIDISK FJELLREV', NULL, '314575016', '2024-07-24 15:50:20.736816+02', '2024-07-24 15:50:20.736816+02'), +('ba69722b-45c5-4fdf-9e45-e931f13e6d3a'::uuid, 51581270, 'organization'::register.party_type, 'SUBJEKTIV TØRR FJELLREV', NULL, '314575024', '2024-07-24 15:50:20.737694+02', '2024-07-24 15:50:20.737694+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('a4a69b2b-a844-4c56-85dc-b217e1d9a115'::uuid, 51581271, 'organization'::register.party_type, 'GRUNN AKROBATISK FJELLREV', NULL, '314575032', '2024-07-24 15:50:20.738585+02', '2024-07-24 15:50:20.738585+02'), +('bc2cc51e-3a93-431c-861f-3e574187073f'::uuid, 51581272, 'organization'::register.party_type, 'HUMORISTISK GUL FJELLREV', NULL, '314575040', '2024-07-24 15:50:20.739544+02', '2024-07-24 15:50:20.739544+02'), +('2832342d-bbc6-4318-b231-f781f9cf76ae'::uuid, 51581273, 'organization'::register.party_type, 'STA SIGEN FJELLREV', NULL, '314575067', '2024-07-24 15:50:20.741237+02', '2024-07-24 15:50:20.741237+02'), +('b5d6a437-84cf-48dc-9253-9045194d6a35'::uuid, 51581274, 'organization'::register.party_type, 'KOMFORTABEL TAPPER FJELLREV', NULL, '314575059', '2024-07-24 15:50:20.74255+02', '2024-07-24 15:50:20.74255+02'), +('07372ede-d121-457b-abeb-3ca43ba46d19'::uuid, 51581275, 'organization'::register.party_type, 'SLITEN ELEKTRONISK FJELLREV', NULL, '314575075', '2024-07-24 15:50:20.74369+02', '2024-07-24 15:50:20.74369+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('30ac93af-bdc8-4ee9-bc45-a82dcfc53534'::uuid, 51581276, 'organization'::register.party_type, 'UGLESETT UGLESETT FJELLREV', NULL, '314575083', '2024-07-24 15:50:20.744611+02', '2024-07-24 15:50:20.744611+02'), +('df07fb62-c36e-4e87-8828-bca9d133cc0e'::uuid, 51581277, 'organization'::register.party_type, 'SPENNENDE LEGITIM FJELLREV', NULL, '314575091', '2024-07-24 15:50:20.745598+02', '2024-07-24 15:50:20.745598+02'), +('35760dad-1e15-4d3a-a632-ff92a3aa98c0'::uuid, 51581278, 'organization'::register.party_type, 'SANNFERDIG KULTURELL FJELLREV', NULL, '314575105', '2024-07-24 15:50:20.746645+02', '2024-07-24 15:50:20.746645+02'), +('f89d3b98-630b-4f34-ac62-f9400a6b54e2'::uuid, 51581279, 'organization'::register.party_type, 'FATTIG VIS FJELLREV', NULL, '314575113', '2024-07-24 15:50:20.747577+02', '2024-07-24 15:50:20.747577+02'), +('48d5fb93-052c-4220-a30f-5a53fb578409'::uuid, 51581280, 'organization'::register.party_type, 'KJÆR KJENT FJELLREV', NULL, '314575121', '2024-07-24 15:50:20.748371+02', '2024-07-24 15:50:20.748371+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('846c3474-beaa-4ce2-bf37-ef2062062c3e'::uuid, 51581281, 'organization'::register.party_type, 'MODERAT BESTEMT FJELLREV', NULL, '314575148', '2024-07-24 15:50:20.749291+02', '2024-07-24 15:50:20.749291+02'), +('502ab079-2175-420f-8d31-6ad7f2084122'::uuid, 51581282, 'organization'::register.party_type, 'LUN JURIDISK FJELLREV', NULL, '314575156', '2024-07-24 15:50:20.750691+02', '2024-07-24 15:50:20.750691+02'), +('ef327fb6-9b79-4dcc-b101-fc1cc399dc02'::uuid, 51390559, 'organization'::register.party_type, 'GLOVARM ØVRIG PIGGSVIN', NULL, '313368947', '2024-07-24 15:50:20.752186+02', '2024-07-24 15:50:20.752186+02'), +('c3ff1ddc-1d64-45e5-b2d0-ed8789463e50'::uuid, 51390558, 'organization'::register.party_type, 'INTRIKAT RUND FJELLREV', NULL, '311996606', '2024-07-24 15:50:20.753193+02', '2024-07-24 15:50:20.753193+02'), +('1b1f224e-68d9-4314-a65e-424aa77b835b'::uuid, 51390560, 'organization'::register.party_type, 'SNILL UNØYAKTIG FJELLREV', NULL, '311996584', '2024-07-24 15:50:20.754487+02', '2024-07-24 15:50:20.754487+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('a488fa17-de34-41f0-b8fb-1fdf5eebb15e'::uuid, 51390561, 'organization'::register.party_type, 'ALMINNELIG KOMFORTABEL FJELLREV', NULL, '311996592', '2024-07-24 15:50:20.755473+02', '2024-07-24 15:50:20.755473+02'), +('4edea665-c169-47be-bbd3-436bc4f4358c'::uuid, 51390562, 'organization'::register.party_type, 'ARITMETISK SUNN FJELLREV', NULL, '311996614', '2024-07-24 15:50:20.756411+02', '2024-07-24 15:50:20.756411+02'), +('20139478-ba17-42ea-a149-060054a8995c'::uuid, 51390563, 'organization'::register.party_type, 'FRYKTSOM ULOGISK FJELLREV', NULL, '311996622', '2024-07-24 15:50:20.757323+02', '2024-07-24 15:50:20.757323+02'), +('f2a5233c-fc47-48d7-95fa-48ee34b53c40'::uuid, 51390564, 'organization'::register.party_type, 'SKRIVEFØR JOVIAL FJELLREV', NULL, '311996630', '2024-07-24 15:50:20.758352+02', '2024-07-24 15:50:20.758352+02'), +('fc90bcca-05bd-455b-b719-aebb76f9b9c9'::uuid, 51390565, 'organization'::register.party_type, 'HÅRSÅR ALMINNELIG FJELLREV', NULL, '311996665', '2024-07-24 15:50:20.759376+02', '2024-07-24 15:50:20.759376+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('4038e683-1fa8-4761-9349-7fd9d9e45e57'::uuid, 51390566, 'organization'::register.party_type, 'FILOSOFISK RIKTIG FJELLREV', NULL, '311996649', '2024-07-24 15:50:20.760415+02', '2024-07-24 15:50:20.760415+02'), +('8c4ae422-64ae-4b7f-b2f6-24c628dd20ec'::uuid, 51390567, 'organization'::register.party_type, 'SPONTAN USIKKER FJELLREV', NULL, '311996657', '2024-07-24 15:50:20.761305+02', '2024-07-24 15:50:20.761305+02'), +('bcc5c225-cefb-4469-b713-92a412000fe7'::uuid, 51531009, 'organization'::register.party_type, 'SJELDEN ALLMEKTIG TIGER AS', NULL, '313769739', '2024-07-24 15:50:20.762178+02', '2024-07-24 15:50:20.762178+02'), +('68a49513-a14c-4601-a63a-a7dddaef46c7'::uuid, 51645603, 'organization'::register.party_type, 'FORNØYD TAUS FJELLREV', NULL, '315282675', '2024-07-24 15:50:20.763137+02', '2024-07-24 15:50:20.763137+02'), +('d19ffb8d-4a72-4db6-98c2-48e37757ce68'::uuid, 51645604, 'organization'::register.party_type, 'SAMARBEIDSVILLIG GRATIS FJELLREV', NULL, '315282691', '2024-07-24 15:50:20.764038+02', '2024-07-24 15:50:20.764038+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('a2bdb6a4-120b-480b-8dc1-e691e9af48e4'::uuid, 51645605, 'organization'::register.party_type, 'HEL PRATSOM FJELLREV', NULL, '315282683', '2024-07-24 15:50:20.764958+02', '2024-07-24 15:50:20.764958+02'), +('ab973d30-a98a-4804-8128-2aa30f8a9143'::uuid, 51645606, 'organization'::register.party_type, 'MISFORNØYD BRA FJELLREV', NULL, '315282705', '2024-07-24 15:50:20.765791+02', '2024-07-24 15:50:20.765791+02'), +('a9ef2bc1-2a9c-4b30-b8c7-e6aae29df0ae'::uuid, 51134638, 'organization'::register.party_type, 'POMPØS FYLDIG LEOPARD ASA', NULL, '314206185', '2024-07-24 15:50:20.76703+02', '2024-07-24 15:50:20.76703+02'), +('fdd51c7f-5778-4cb9-b169-99b82c8e6bfe'::uuid, 51134637, 'organization'::register.party_type, 'ALVORLIG LEDENDE FJELLREV', NULL, '211951362', '2024-07-24 15:50:20.767879+02', '2024-07-24 15:50:20.767879+02'), +('1252f03c-99b2-40d1-a153-e6e0385b165a'::uuid, 51385457, 'organization'::register.party_type, 'UTYDELIG SPONTAN FJELLREV', NULL, '311951319', '2024-07-24 15:50:20.768681+02', '2024-07-24 15:50:20.768681+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('f2b1ac3a-ba1a-421d-b155-89fe88cd4628'::uuid, 51385458, 'organization'::register.party_type, 'UGLESETT SPESIELL FJELLREV', NULL, '311951327', '2024-07-24 15:50:20.769498+02', '2024-07-24 15:50:20.769498+02'), +('8d73ae55-cc86-448d-bf08-2f0f49d97087'::uuid, 51385459, 'organization'::register.party_type, 'FASCINERENDE KJEMPENDE FJELLREV', NULL, '311951335', '2024-07-24 15:50:20.770333+02', '2024-07-24 15:50:20.770333+02'), +('4cac149b-0c55-4ca9-a8ab-8fc3280405ad'::uuid, 51385460, 'organization'::register.party_type, 'INITIATIVRIK AKVATISK FJELLREV', NULL, '311951343', '2024-07-24 15:50:20.771225+02', '2024-07-24 15:50:20.771225+02'), +('24c26160-37b3-48c2-bbca-71301e8dfeef'::uuid, 51385461, 'organization'::register.party_type, 'FESTLIG ENKEL FJELLREV', NULL, '311951351', '2024-07-24 15:50:20.772076+02', '2024-07-24 15:50:20.772076+02'), +('b807c1fe-620a-4adc-81fd-6bcd92882f92'::uuid, 51385462, 'organization'::register.party_type, 'PARAT KLAR FJELLREV', NULL, '311951378', '2024-07-24 15:50:20.772993+02', '2024-07-24 15:50:20.772993+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('03633b71-1ad4-473d-aa19-70e3d914f1ac'::uuid, 51385463, 'organization'::register.party_type, 'OPPGITT GJENSIDIG FJELLREV', NULL, '311951386', '2024-07-24 15:50:20.773772+02', '2024-07-24 15:50:20.773772+02'), +('6555071b-663b-4daf-81f7-958f266428d9'::uuid, 51385464, 'organization'::register.party_type, 'DOGMATISK ALDRENDE FJELLREV', NULL, '311951394', '2024-07-24 15:50:20.77465+02', '2024-07-24 15:50:20.77465+02'), +('17efb575-aff9-44f7-a088-706959203ad6'::uuid, 51385465, 'organization'::register.party_type, 'FALSK SINDIG FJELLREV', NULL, '311951408', '2024-07-24 15:50:20.775476+02', '2024-07-24 15:50:20.775476+02'), +('a17f73f2-717c-4659-ad27-de13724162c5'::uuid, 51385466, 'organization'::register.party_type, 'TILFREDSSTILLENDE EPISK FJELLREV', NULL, '311951416', '2024-07-24 15:50:20.776429+02', '2024-07-24 15:50:20.776429+02'), +('3292cff1-5977-476a-8b5a-09cbbc4f1102'::uuid, 51385467, 'organization'::register.party_type, 'UTMERKET SENSITIV FJELLREV', NULL, '311951424', '2024-07-24 15:50:20.777272+02', '2024-07-24 15:50:20.777272+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('0af1ceaf-f506-4c33-9f02-f6db34cf0c81'::uuid, 51385468, 'organization'::register.party_type, 'EKSEMPLARISK KVART FJELLREV', NULL, '311951432', '2024-07-24 15:50:20.778149+02', '2024-07-24 15:50:20.778149+02'), +('b6368d0a-bce4-4798-8460-f4f86fc354c2'::uuid, 50056131, 'organization'::register.party_type, 'MOEN OG BJØRNEVATN', NULL, '910114166', '2024-07-24 15:50:20.779083+02', '2024-07-24 15:50:20.779083+02'), +('08cb91ff-75a4-45a4-b141-3c6be1bf8728'::uuid, 50056655, 'organization'::register.party_type, 'NERLANDSØY OG DYRANUT', NULL, '910056077', '2024-07-24 15:50:20.779963+02', '2024-07-24 15:50:20.779963+02'), +('8b41e3e0-63c6-43b9-8198-f76d65b3c502'::uuid, 50004483, 'organization'::register.party_type, 'DIGITALISERINGSDIREKTORATET', NULL, '991825827', '2024-07-24 15:50:20.780887+02', '2024-07-24 15:50:20.780887+02'), +('0eb8bdbd-6881-41dc-bf19-cc2f52b4864c'::uuid, 51194306, 'organization'::register.party_type, 'VIRTUELL OPPRETTHOLDENDE TIGER AS', NULL, '310099791', '2024-07-24 15:50:20.782064+02', '2024-07-24 15:50:20.782064+02'); + +INSERT INTO register.party(uuid, id, party_type, name, person_identifier, organization_identifier, created, updated) + VALUES ('3b3c4510-e5ba-4841-b4c8-0e9a425caf2b'::uuid, 51662129, 'organization'::register.party_type, 'SIVILISERT ALTETENDE FJELLREV', NULL, '315464455', '2024-07-24 15:50:20.783011+02', '2024-07-24 15:50:20.783011+02'), +('c9a9cf08-03fe-4d5b-91dc-63c561de9356'::uuid, 51662130, 'organization'::register.party_type, 'FUNKSJONELL STRENG FJELLREV', NULL, '315464463', '2024-07-24 15:50:20.783976+02', '2024-07-24 15:50:20.783976+02'), +('a5750a4c-5528-485f-9f6c-466e80871f16'::uuid, 51109924, 'organization'::register.party_type, 'KVART RAVGUL TIGER AS', NULL, '314243609', '2024-07-24 15:50:20.784908+02', '2024-07-24 15:50:20.784908+02'), +('5a051ad0-faa8-44e1-a572-ef4c3ef3e870'::uuid, 51134826, 'organization'::register.party_type, 'VAKKER SMART FJELLREV', NULL, '211963212', '2024-07-24 15:50:20.78586+02', '2024-07-24 15:50:20.78586+02'), +('1ce4a0a9-dbb4-4d53-8997-d435de4531fa'::uuid, 51386865, 'organization'::register.party_type, 'KVART LUN FJELLREV', NULL, '311963201', '2024-07-24 15:50:20.786775+02', '2024-07-24 15:50:20.786775+02'); + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/TestData/[register.organization]/01-organization.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/TestData/[register.organization]/01-organization.sql new file mode 100644 index 00000000..bb7e26a4 --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/TestData/[register.organization]/01-organization.sql @@ -0,0 +1,266 @@ +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('29ad8a2a-19be-411d-a6c5-947ec5527c61'::uuid, 'N', 'AS', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('239e3cc3-0f46-4ac0-aa0d-3e649b713953'::uuid, 'N', 'AS', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('3268353b-0a0d-40f1-9eb5-65cf02346702'::uuid, 'N', 'AS', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('1cb69e92-50e5-4e64-b171-25c07d409f04'::uuid, 'N', 'AS', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('e2081abd-a16f-4302-93b0-05aaa42023e8'::uuid, 'N', 'AS', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('4b28742a-5cd0-400e-a096-bd9817d12dca'::uuid, 'N', 'BEDR', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('ad18578d-94cb-4774-8f37-5b24801c219b'::uuid, 'N', 'BEDR', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('ec09feda-5dba-4b84-ad0b-f7886e6082cd'::uuid, 'N', 'BEDR', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('06ca0613-5c5d-41dd-b20f-65f0d017b41b'::uuid, 'N', 'AS', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('2d1a79f5-e79e-4f39-acd2-e669115c27eb'::uuid, 'N', 'BEDR', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('c28daaae-e64f-4f07-9cfe-7fb5428263b9'::uuid, 'N', 'BEDR', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('eb459c21-4d07-462a-bb49-be4667042519'::uuid, 'N', 'BEDR', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('3456aeb0-f771-43e8-b30e-f8c5a919a808'::uuid, 'N', 'AS', NULL, NULL, NULL, '', NULL, NULL, NULL), +('8ea13a49-c7dd-4038-8dee-65eae54ccfa7'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('52c41755-bb31-41e6-b0cf-26e165275e9f'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('484bb095-3c91-44f5-ac42-43b2184160f4'::uuid, 'E', 'SÆR', NULL, NULL, NULL, 'cassiopeia@grustislit.no', NULL, NULL, NULL), +('2be8b561-d608-44b6-90b9-7ad507f18cf7'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('054042b1-41cd-4887-b4b6-d7f13b01f7c8'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('9701c6f9-8a5c-4d66-80d4-dfa592aba2de'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('b006ee54-fe5f-4ec2-a506-efc6538fdc33'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('308af25c-90d4-4605-b624-bb244eb054f2'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('2ca597ef-56bd-4168-ba5c-ffc9627f4418'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('c6caa88b-1c7b-4020-8c23-508c0754fe11'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('5939c7a2-44b3-4d86-b955-931f551da3a2'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('72c91500-7c6a-4613-ad4e-a1e16aba6acf'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('06a2c4c6-01e7-487a-a910-97d6bf03eaa4'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('e9e19980-b6c9-41f2-9465-e119f808acfa'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('34d9cfe9-04f6-478b-918f-e5d38958bfb3'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('187c1828-c7bf-464c-90f2-78fc09bb08c1'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('4f52b835-eeb5-48c8-9bae-b931bf0f6bca'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('d7c25b47-c691-422c-93d1-54782c4a11d4'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('81373a37-74ca-4b97-bdaf-9243f59f952f'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('1eabfd3c-7020-49bf-8221-869ffba964bf'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('115e84f4-b41e-40e4-9a6e-49808b0fa6f7'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('427ceb9a-8820-431d-afff-db9dcd8294fa'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('0c81a5ef-b894-403b-b005-2d2b0353e2c4'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('c2a90dd9-4f93-4a75-a447-d9d58e42d910'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('0dd7e44a-202c-4069-b0c5-87f84f88be19'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('5eabab58-2091-4063-8ef4-c0551a43fdfa'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('24c6960b-2919-4ca0-bb85-a18c63370558'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('183a65e3-256e-41dc-906d-996551c4400d'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('2bfdf206-9c64-48d5-a9e9-ee3953a7b635'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('b05ed16f-3ba4-4732-8967-f69d2f9a8abf'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('75a8bd4b-4326-44a5-92c6-aa46da3df06c'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('ec175cf4-81a8-47e7-9343-43f34eed1e2c'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('ea5d86ac-f54c-4062-a1bf-faaeb19647ef'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('f3c3fc11-7c77-4fd1-b45d-66766f76a313'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('b512df33-5e08-4ebf-b8d5-58503ffc336f'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('587d7381-90dd-4056-b81b-13c60d374882'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('1690da3d-4656-4502-a95d-3221f6b8d772'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('708117e3-e5f1-4154-8f57-0e95b6228742'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('71ee56bd-230b-4b05-bfc4-46b0ea365f91'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('37b140ba-b84e-485b-b2e6-12c17fac5454'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('7f80964d-c197-4200-8427-715dab480562'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('94aec3d7-9dd8-4cd4-a2f9-89c161d1032b'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('9514930a-9955-4a54-9391-ba3b7d04f03d'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('12088b83-1b8a-4590-8fea-57d185566ded'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('47cbe016-9fe6-4cc4-91e7-ab54d4a0e229'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('81352583-7f3a-4c30-9f73-340c08d4f980'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('8bc51893-35bd-4325-b8e5-53740367e911'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('3871f548-3a4c-420b-ba78-5bb40d3feaab'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('9922fc05-decc-43df-a659-8414b0b31fbb'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('107c341c-a378-4bda-80f4-510647bf4b18'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('d3a2b092-457d-4014-a0ec-3429660630b8'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('70c75760-a9b2-4960-840b-b0f4ba674550'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('bfd5b29e-cdd1-4af8-bfcf-3a8eae2c777b'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('c047c90e-6a98-417c-be12-97b593ed3a51'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('aca19de1-870d-4ba4-b090-5c29a1a339ad'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('700b04f8-eec1-40ca-a1f8-d547d0360a07'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('bcfada41-1ea5-4281-9dfe-efb8570a9fbc'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('cedcba81-5c20-4893-b425-c5a13d1f48d1'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('058a75db-fbe0-4cf9-b2b8-097d0556c4fe'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('39667992-6b42-47f2-9254-29362ed4420c'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('94bf8cfa-506f-4ef2-8ae5-3c470e2b550d'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('7e9c8439-5f0c-4e2e-b492-b0b678976fd5'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('89989c17-c04c-49f5-a8d5-24aee4b5009a'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('8f9ed624-393d-4511-a7c4-6e7fa3bf4404'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('34845a9e-c018-4757-a074-f87221b9c138'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('94576f3f-2db0-4bc1-9533-6e392791c192'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('75ae06b3-bed6-4374-ad31-c5e9453db754'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('c7868e84-f66c-4eaf-a565-dc91e85b02c0'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('96fe9992-a10d-49f0-adef-e65e85154ffb'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('0d982c80-fc8f-40d0-90a0-574de74f3eaa'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('1bf615ee-61f5-4c57-a53a-d9bb55ed5a75'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('c40ee674-832b-4125-80ed-861f02743e36'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('05a123cb-31e5-4544-b74e-0b1f09adf681'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('2d6f5724-4d33-4fe4-a3d1-305ed1e84f73'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('3978e117-4a3c-4566-8418-41fb2d87ad97'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('ce24b30c-e7c9-400e-8bba-4c2a36e2c2cf'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('dcdf7526-28de-4c6a-bd36-2cca6f50cb4c'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('143f6893-771d-4fa0-b451-8c5fefdbeed0'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('d89ee79e-fc03-4bd6-8e2f-a4a47a92dfc1'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('96309092-59d1-40f9-a345-d5324a428a1c'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('07b8aff3-2732-42da-9a6f-283dbfb0f4d7'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('8dfa654f-7e6c-4012-ad54-dac5c70625a9'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('2156d85f-3fc3-40c5-aa68-7d20f872e707'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('5c0beb8d-7a74-4fcf-b72c-0334330e8d91'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('3e6eaada-0903-4e36-9731-53cfd6e17507'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('486311d8-2b61-46bd-ad0d-fa70c91bb21e'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('7f0b6ae5-3dc3-43a6-959b-5d7b45460703'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('494c9c1b-338f-43b6-9219-aaab3db328b7'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('2bd05568-c303-4672-a60f-5bd6e56a98c8'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('0237e5e6-fd34-4353-8d34-15b647cc1619'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('4b4a29e3-d8a8-42e6-a3aa-dcdf9c186c7e'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('6d639164-ec75-43f5-be54-4311043f4630'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('c1f5259a-a54b-48ca-9462-784e153eaacf'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('03681d95-47fb-40c2-b81c-b8a7e86a4824'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('e7d453a4-2052-4a2a-b0a1-95439c9d5559'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('cc53cd44-f43a-4a57-86d9-6487de742a01'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('104b63e0-a98d-40b2-882b-185f53827c25'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('c11a862a-a087-42c2-9454-0fae22af3254'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('f136ffc3-bcc8-4615-a0d5-5ef1ce922f8f'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('aafb3ef3-6e72-48ca-afd0-8817d0472ec5'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('3dcad59c-c0e3-477f-9ff2-560abc4fa4c8'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('3875e025-a04f-4ed2-bdbb-9bd8a19b0470'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('f1a26d17-8052-4a99-a6ba-565116752ef3'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('15e206ff-f62f-4ab0-9f3f-bc1e362142f5'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('47b57fbd-c1e3-4e94-b242-022ee23049da'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('8c337033-c1aa-4dd4-8fb0-ae5f47f54317'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('96a51c3c-9c7c-4e26-80d9-93b1d38ee692'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('35c33858-4e44-4d8e-a2fc-751f01fc4e17'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('57b263f1-6627-4ffe-86b7-187bfd7b11cc'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('5701057f-ceb7-4fb9-b584-3fe29ab8f623'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('0e5af2b1-36a3-488e-addf-882e0584d102'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('a8bb2844-7c50-43d2-9f97-f85ee5b5f42d'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('1c6facc0-256b-4c35-b245-f10f114d9fdb'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('348b3f99-6cf2-42ed-bfc8-82baf2a486cf'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('3de1641d-db1c-4a96-8602-75fac8e7c0ea'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('12806cfe-3604-4c40-b941-e85ff9af1621'::uuid, 'N', 'KOMM', NULL, NULL, NULL, 'sceptrum@polissarin.com', NULL, NULL, NULL), +('715df08b-56fb-4b3d-9b8b-e278e6a0e5fd'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('a990e084-51dd-4ffd-96ff-f8f04290ef1d'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('5b16e766-60c0-4314-acd2-995a415757ca'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('8c54a744-7504-4651-bfb5-a2d4dd50c9db'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('34192bc0-9b44-41e1-b11b-3f3ec03c3b52'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('220188c5-a0ed-4e74-b76d-4ce5236fc8b7'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('05b02ba0-763f-4971-bf47-14a1cbe3e455'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('34ec8440-dada-4338-b19d-b51b483c3206'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('72d9fa0e-ccb7-4fe0-b4a7-f0649e15c909'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('93937daa-8459-4f59-b318-d11054479d2c'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('ba69722b-45c5-4fdf-9e45-e931f13e6d3a'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('a4a69b2b-a844-4c56-85dc-b217e1d9a115'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('bc2cc51e-3a93-431c-861f-3e574187073f'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('2832342d-bbc6-4318-b231-f781f9cf76ae'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('b5d6a437-84cf-48dc-9253-9045194d6a35'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('07372ede-d121-457b-abeb-3ca43ba46d19'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('30ac93af-bdc8-4ee9-bc45-a82dcfc53534'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('df07fb62-c36e-4e87-8828-bca9d133cc0e'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('35760dad-1e15-4d3a-a632-ff92a3aa98c0'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('f89d3b98-630b-4f34-ac62-f9400a6b54e2'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('48d5fb93-052c-4220-a30f-5a53fb578409'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('846c3474-beaa-4ce2-bf37-ef2062062c3e'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('502ab079-2175-420f-8d31-6ad7f2084122'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('ef327fb6-9b79-4dcc-b101-fc1cc399dc02'::uuid, 'E', 'ORGL', NULL, NULL, NULL, '', NULL, NULL, NULL), +('c3ff1ddc-1d64-45e5-b2d0-ed8789463e50'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('1b1f224e-68d9-4314-a65e-424aa77b835b'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('a488fa17-de34-41f0-b8fb-1fdf5eebb15e'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('4edea665-c169-47be-bbd3-436bc4f4358c'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('20139478-ba17-42ea-a149-060054a8995c'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('f2a5233c-fc47-48d7-95fa-48ee34b53c40'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('fc90bcca-05bd-455b-b719-aebb76f9b9c9'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('4038e683-1fa8-4761-9349-7fd9d9e45e57'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('8c4ae422-64ae-4b7f-b2f6-24c628dd20ec'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('bcc5c225-cefb-4469-b713-92a412000fe7'::uuid, 'E', 'AS', NULL, NULL, NULL, 'camelopardalis@wurrenmahasim.com', NULL, NULL, NULL), +('68a49513-a14c-4601-a63a-a7dddaef46c7'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('d19ffb8d-4a72-4db6-98c2-48e37757ce68'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('a2bdb6a4-120b-480b-8dc1-e691e9af48e4'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('ab973d30-a98a-4804-8128-2aa30f8a9143'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('a9ef2bc1-2a9c-4b30-b8c7-e6aae29df0ae'::uuid, 'E', 'ASA', NULL, NULL, NULL, '', NULL, NULL, NULL), +('fdd51c7f-5778-4cb9-b169-99b82c8e6bfe'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('1252f03c-99b2-40d1-a153-e6e0385b165a'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('f2b1ac3a-ba1a-421d-b155-89fe88cd4628'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('8d73ae55-cc86-448d-bf08-2f0f49d97087'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('4cac149b-0c55-4ca9-a8ab-8fc3280405ad'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('24c26160-37b3-48c2-bbca-71301e8dfeef'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('b807c1fe-620a-4adc-81fd-6bcd92882f92'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('03633b71-1ad4-473d-aa19-70e3d914f1ac'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('6555071b-663b-4daf-81f7-958f266428d9'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('17efb575-aff9-44f7-a088-706959203ad6'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('a17f73f2-717c-4659-ad27-de13724162c5'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('3292cff1-5977-476a-8b5a-09cbbc4f1102'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('0af1ceaf-f506-4c33-9f02-f6db34cf0c81'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('b6368d0a-bce4-4798-8460-f4f86fc354c2'::uuid, 'N', 'FLI', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('08cb91ff-75a4-45a4-b141-3c6be1bf8728'::uuid, 'N', 'BEDR', NULL, NULL, NULL, 'test@test.test', NULL, NULL, NULL), +('8b41e3e0-63c6-43b9-8198-f76d65b3c502'::uuid, 'N', 'AS', NULL, NULL, NULL, 'ehl@digdir.no', NULL, NULL, NULL), +('0eb8bdbd-6881-41dc-bf19-cc2f52b4864c'::uuid, 'E', 'AS', NULL, NULL, NULL, '', NULL, NULL, NULL); + +INSERT INTO register.organization(uuid, unit_status, unit_type, telephone_number, mobile_number, fax_number, email_address, internet_address, mailing_address, business_address) + VALUES ('3b3c4510-e5ba-4841-b4c8-0e9a425caf2b'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('c9a9cf08-03fe-4d5b-91dc-63c561de9356'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('a5750a4c-5528-485f-9f6c-466e80871f16'::uuid, 'E', 'AS', NULL, NULL, NULL, 'cepheus@atriaalnilam.com', NULL, NULL, NULL), +('5a051ad0-faa8-44e1-a572-ef4c3ef3e870'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL), +('1ce4a0a9-dbb4-4d53-8997-d435de4531fa'::uuid, 'N', 'BEDR', NULL, NULL, NULL, '', NULL, NULL, NULL); + From 278638cbceb82c2894f5b663390ed2c2673c289f Mon Sep 17 00:00:00 2001 From: Aleksander Heintz Date: Wed, 24 Jul 2024 16:23:09 +0200 Subject: [PATCH 2/2] chore: make migration not a draft --- .../Migration/_draft/00-enums.sql | 26 ---------------- .../Migration/_draft/01-identifiers.sql | 20 ------------- .../Migration/_draft/02-address.sql | 30 ------------------- .../Migration/_draft/03-party-table.sql | 22 -------------- .../Migration/v0.01-party/00-enums.sql | 12 ++++++++ .../Migration/v0.01-party/01-identifiers.sql | 6 ++++ .../Migration/v0.01-party/02-address.sql | 16 ++++++++++ .../Migration/v0.01-party/03-party-table.sql | 22 ++++++++++++++ .../04-party-source-ref-table.sql | 2 +- .../05-person-table.sql | 2 +- .../06-organization-table.sql | 2 +- 11 files changed, 59 insertions(+), 101 deletions(-) delete mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/00-enums.sql delete mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/01-identifiers.sql delete mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/02-address.sql delete mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/03-party-table.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/00-enums.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/01-identifiers.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/02-address.sql create mode 100644 src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/03-party-table.sql rename src/Altinn.Register/src/Altinn.Register.Persistence/Migration/{_draft => v0.01-party}/04-party-source-ref-table.sql (87%) rename src/Altinn.Register/src/Altinn.Register.Persistence/Migration/{_draft => v0.01-party}/05-person-table.sql (88%) rename src/Altinn.Register/src/Altinn.Register.Persistence/Migration/{_draft => v0.01-party}/06-organization-table.sql (88%) diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/00-enums.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/00-enums.sql deleted file mode 100644 index c7365fe0..00000000 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/00-enums.sql +++ /dev/null @@ -1,26 +0,0 @@ --- Enum: register.party_type -DO $$ -BEGIN - CREATE TYPE register.party_type AS ENUM( - 'person', - 'organization' -); -EXCEPTION - WHEN duplicate_object THEN - NULL; -END -$$; - --- Enum: register.party_source -DO $$ -BEGIN - CREATE TYPE register.party_source AS ENUM( - 'folkeregistered', - 'enhetsregisteret' -); -EXCEPTION - WHEN duplicate_object THEN - NULL; -END -$$; - diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/01-identifiers.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/01-identifiers.sql deleted file mode 100644 index 30487131..00000000 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/01-identifiers.sql +++ /dev/null @@ -1,20 +0,0 @@ --- Domain: register.person_identifier -DO $$ -BEGIN - CREATE DOMAIN register.person_identifier AS text CONSTRAINT fmtchk CHECK(value ~ '^[0-9]{11}$'); -EXCEPTION - WHEN duplicate_object THEN - NULL; -END -$$; - --- Domain: register.organization_identifier -DO $$ -BEGIN - CREATE DOMAIN register.organization_identifier AS text CONSTRAINT fmtchk CHECK(value ~ '^[0-9]{9}$'); -EXCEPTION - WHEN duplicate_object THEN - NULL; -END -$$; - diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/02-address.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/02-address.sql deleted file mode 100644 index 8fcc5bb9..00000000 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/02-address.sql +++ /dev/null @@ -1,30 +0,0 @@ --- Composite: register._address (private - implementation detail) -DO $$ -BEGIN - CREATE TYPE register._address AS( - municipal_number text, - municipal_name text, - street_name text, - house_number text, - house_letter text, - apartment_number text, - postal_code text, - city text -); -EXCEPTION - WHEN duplicate_object THEN - NULL; -END -$$; - --- Domain: register.address -DO $$ -BEGIN - -- No checks at this time, but create a domain so they can be added later - CREATE DOMAIN register.address AS register._address; -EXCEPTION - WHEN duplicate_object THEN - NULL; -END -$$; - diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/03-party-table.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/03-party-table.sql deleted file mode 100644 index 28421e7b..00000000 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/03-party-table.sql +++ /dev/null @@ -1,22 +0,0 @@ --- Table: register.party -CREATE TABLE IF NOT EXISTS register.party( - uuid uuid PRIMARY KEY NOT NULL, - id bigint NOT NULL, - party_type register.party_type NOT NULL, - name text NOT NULL, - person_identifier register.person_identifier, - organization_identifier register.organization_identifier, - created timestamp with time zone NOT NULL, - updated timestamp with time zone NOT NULL, - CONSTRAINT type_identifier_check CHECK ((party_type = 'person'::register.party_type AND person_identifier IS NOT NULL AND organization_identifier IS NULL) OR (party_type = 'organization'::register.party_type AND person_identifier IS NULL AND organization_identifier IS NOT NULL)) -) -TABLESPACE pg_default; - -CREATE UNIQUE INDEX IF NOT EXISTS uq_party_uuid ON register.party(uuid) INCLUDE (id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; - -CREATE UNIQUE INDEX IF NOT EXISTS uq_party_id ON register.party(id) INCLUDE (id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; - -CREATE UNIQUE INDEX IF NOT EXISTS uq_person_identifier ON register.party(person_identifier) INCLUDE (id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; - -CREATE UNIQUE INDEX IF NOT EXISTS uq_organization_identifier ON register.party(organization_identifier) INCLUDE (id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; - diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/00-enums.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/00-enums.sql new file mode 100644 index 00000000..0fddfeb5 --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/00-enums.sql @@ -0,0 +1,12 @@ +-- Enum: register.party_type +CREATE TYPE register.party_type AS ENUM( + 'person', + 'organization' +); + +-- Enum: register.party_source +CREATE TYPE register.party_source AS ENUM( + 'folkeregistered', + 'enhetsregisteret' +); + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/01-identifiers.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/01-identifiers.sql new file mode 100644 index 00000000..156728a4 --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/01-identifiers.sql @@ -0,0 +1,6 @@ +-- Domain: register.person_identifier +CREATE DOMAIN register.person_identifier AS text CONSTRAINT fmtchk CHECK (value ~ '^[0-9]{11}$'); + +-- Domain: register.organization_identifier +CREATE DOMAIN register.organization_identifier AS text CONSTRAINT fmtchk CHECK (value ~ '^[0-9]{9}$'); + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/02-address.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/02-address.sql new file mode 100644 index 00000000..1316f904 --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/02-address.sql @@ -0,0 +1,16 @@ +-- Composite: register._address (private - implementation detail) +CREATE TYPE register._address AS ( + municipal_number text, + municipal_name text, + street_name text, + house_number text, + house_letter text, + apartment_number text, + postal_code text, + city text +); + +-- Domain: register.address +-- No checks at this time, but create a domain so they can be added later +CREATE DOMAIN register.address AS register._address; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/03-party-table.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/03-party-table.sql new file mode 100644 index 00000000..0ab2e99f --- /dev/null +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/03-party-table.sql @@ -0,0 +1,22 @@ +-- Table: register.party +CREATE TABLE register.party( + uuid uuid PRIMARY KEY NOT NULL, + id bigint NOT NULL, + party_type register.party_type NOT NULL, + name text NOT NULL, + person_identifier register.person_identifier, + organization_identifier register.organization_identifier, + created timestamp with time zone NOT NULL, + updated timestamp with time zone NOT NULL, + CONSTRAINT type_identifier_check CHECK ((party_type = 'person'::register.party_type AND person_identifier IS NOT NULL AND organization_identifier IS NULL) OR (party_type = 'organization'::register.party_type AND person_identifier IS NULL AND organization_identifier IS NOT NULL)) +) +TABLESPACE pg_default; + +CREATE UNIQUE INDEX uq_party_uuid ON register.party(uuid) INCLUDE (uuid, id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; + +CREATE UNIQUE INDEX uq_party_id ON register.party(id) INCLUDE (uuid, id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; + +CREATE UNIQUE INDEX uq_person_identifier ON register.party(person_identifier) INCLUDE (uuid, id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; + +CREATE UNIQUE INDEX uq_organization_identifier ON register.party(organization_identifier) INCLUDE (uuid, id, party_type, name, person_identifier, organization_identifier) TABLESPACE pg_default; + diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/04-party-source-ref-table.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/04-party-source-ref-table.sql similarity index 87% rename from src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/04-party-source-ref-table.sql rename to src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/04-party-source-ref-table.sql index 585c503a..91baa796 100644 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/04-party-source-ref-table.sql +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/04-party-source-ref-table.sql @@ -1,5 +1,5 @@ -- Table: register.party_source_ref -CREATE TABLE IF NOT EXISTS register.party_source_ref( +CREATE TABLE register.party_source_ref( party_uuid uuid NOT NULL REFERENCES register.party(uuid) ON DELETE CASCADE ON UPDATE CASCADE, source register.party_source NOT NULL, source_identifier text NOT NULL, diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/05-person-table.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/05-person-table.sql similarity index 88% rename from src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/05-person-table.sql rename to src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/05-person-table.sql index 2c85ef00..048e67ce 100644 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/05-person-table.sql +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/05-person-table.sql @@ -1,5 +1,5 @@ -- Table: register.person -CREATE TABLE IF NOT EXISTS register.person( +CREATE TABLE register.person( uuid uuid PRIMARY KEY NOT NULL REFERENCES register.party(uuid) ON DELETE CASCADE ON UPDATE CASCADE, first_name text NOT NULL, middle_name text, diff --git a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/06-organization-table.sql b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/06-organization-table.sql similarity index 88% rename from src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/06-organization-table.sql rename to src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/06-organization-table.sql index d713e545..1969a390 100644 --- a/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/_draft/06-organization-table.sql +++ b/src/Altinn.Register/src/Altinn.Register.Persistence/Migration/v0.01-party/06-organization-table.sql @@ -1,5 +1,5 @@ -- Table: register.organization -CREATE TABLE IF NOT EXISTS register.organization( +CREATE TABLE register.organization( uuid uuid PRIMARY KEY NOT NULL REFERENCES register.party(uuid) ON DELETE CASCADE ON UPDATE CASCADE, unit_status text, unit_type text,