move legacy_id trigger-functions to module schema

This commit is contained in:
Michael Hoennig 2024-09-20 08:44:35 +02:00
parent 7decf28293
commit 7563f32215
7 changed files with 37 additions and 37 deletions

View File

@ -49,7 +49,7 @@ INSERT INTO hs_office.contact_legacy_id(uuid, contact_id)
-- ============================================================================
--changeset michael.hoennig:hs-office-contact-MIGRATION-insert-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function insertContactLegacyIdMapping()
create or replace function hs_office.contact_insert_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -64,17 +64,17 @@ begin
return NEW;
end; $$;
create trigger createContactLegacyIdMapping
create trigger insert_legacy_id_mapping_tg
after insert on hs_office.contact
for each row
execute procedure insertContactLegacyIdMapping();
execute procedure hs_office.contact_insert_legacy_id_mapping_tf();
--/
-- ============================================================================
--changeset michael.hoennig:hs-office-contact-MIGRATION-delete-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function deleteContactLegacyIdMapping()
create or replace function hs_office.contact_delete_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -89,8 +89,8 @@ begin
return OLD;
end; $$;
create trigger removeContactLegacyIdMapping
create trigger delete_legacy_id_mapping_tf
before delete on hs_office.contact
for each row
execute procedure deleteContactLegacyIdMapping();
execute procedure hs_office.contact_delete_legacy_id_mapping_tf();
--/

View File

@ -48,7 +48,7 @@ INSERT INTO hs_office.partner_legacy_id(uuid, bp_id)
-- ============================================================================
--changeset michael.hoennig:hs-office-partner-MIGRATION-insert-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function insertPartnerLegacyIdMapping()
create or replace function hs_office.partner_insert_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -63,17 +63,17 @@ begin
return NEW;
end; $$;
create trigger createPartnerLegacyIdMapping
create trigger insert_legacy_id_mapping_tf
after insert on hs_office.partner
for each row
execute procedure insertPartnerLegacyIdMapping();
execute procedure hs_office.partner_insert_legacy_id_mapping_tf();
--/
-- ============================================================================
--changeset michael.hoennig:hs-office-partner-MIGRATION-delete-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function deletePartnerLegacyIdMapping()
create or replace function hs_office.partner_delete_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -88,8 +88,8 @@ begin
return OLD;
end; $$;
create trigger removePartnerLegacyIdMapping
create trigger delete_legacy_id_mapping_tg
before delete on hs_office.partner
for each row
execute procedure deletePartnerLegacyIdMapping();
execute procedure hs_office.partner_delete_legacy_id_mapping_tf();
--/

View File

@ -50,7 +50,7 @@ INSERT INTO hs_office.sepamandate_legacy_id(uuid, sepa_mandate_id)
-- ============================================================================
--changeset michael.hoennig:hs-office-sepamandate-MIGRATION-insert-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function insertSepaMandateLegacyIdMapping()
create or replace function hs_office.sepamandate_insert_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -65,17 +65,17 @@ begin
return NEW;
end; $$;
create trigger createSepaMandateLegacyIdMapping
create trigger insert_legacy_id_mapping_tg
after insert on hs_office.sepamandate
for each row
execute procedure insertSepaMandateLegacyIdMapping();
execute procedure hs_office.sepamandate_insert_legacy_id_mapping_tf();
--/
-- ============================================================================
--changeset michael.hoennig:hs-office-sepamandate-MIGRATION-delete-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function deleteSepaMandateLegacyIdMapping()
create or replace function hs_office.sepamandate_delete_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -90,8 +90,8 @@ begin
return OLD;
end; $$;
create trigger removeSepaMandateLegacyIdMapping
create trigger delete_legacy_id_mapping_tf
before delete on hs_office.sepamandate
for each row
execute procedure deleteSepaMandateLegacyIdMapping();
execute procedure hs_office.sepamandate_delete_legacy_id_mapping_tf();
--/

View File

@ -49,7 +49,7 @@ INSERT INTO hs_office.coopsharestransaction_legacy_id(uuid, member_share_id)
-- ============================================================================
--changeset michael.hoennig:hs-office-coopShares-MIGRATION-insert-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function insertCoopSharesLegacyIdMapping()
create or replace function hs_office.coopsharetx_insert_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -64,17 +64,17 @@ begin
return NEW;
end; $$;
create trigger createCoopSharesLegacyIdMapping
create trigger insert_legacy_id_mapping_tg
after insert on hs_office.coopsharestransaction
for each row
execute procedure insertCoopSharesLegacyIdMapping();
execute procedure hs_office.coopsharetx_insert_legacy_id_mapping_tf();
--/
-- ============================================================================
--changeset michael.hoennig:hs-office-coopShares-MIGRATION-delete-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function deleteCoopSharesLegacyIdMapping()
create or replace function hs_office.coopsharetx_delete_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -89,8 +89,8 @@ begin
return OLD;
end; $$;
create trigger removeCoopSharesLegacyIdMapping
create trigger delete_legacy_id_mapping_tg
before delete on hs_office.coopsharestransaction
for each row
execute procedure deleteCoopSharesLegacyIdMapping();
execute procedure hs_office.coopsharetx_delete_legacy_id_mapping_tf();
--/

View File

@ -49,7 +49,7 @@ INSERT INTO hs_office.coopassetstransaction_legacy_id(uuid, member_asset_id)
-- ============================================================================
--changeset michael.hoennig:hs-office-coopAssets-MIGRATION-insert-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function insertCoopAssetsLegacyIdMapping()
create or replace function hs_office.coopassettx_insert_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -64,17 +64,17 @@ begin
return NEW;
end; $$;
create trigger createCoopAssetsLegacyIdMapping
create trigger insert_legacy_id_mapping_tg
after insert on hs_office.coopassetstransaction
for each row
execute procedure insertCoopAssetsLegacyIdMapping();
execute procedure hs_office.coopassettx_insert_legacy_id_mapping_tf();
--/
-- ============================================================================
--changeset michael.hoennig:hs-office-coopAssets-MIGRATION-delete-trigger endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function deleteCoopAssetsLegacyIdMapping()
create or replace function hs_office.coopassettx_delete_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -89,8 +89,8 @@ begin
return OLD;
end; $$;
create trigger removeCoopAssetsLegacyIdMapping
create trigger delete_legacy_id_mapping_tg
before delete on hs_office.coopassetstransaction
for each row
execute procedure deleteCoopAssetsLegacyIdMapping();
execute procedure hs_office.coopassettx_delete_legacy_id_mapping_tf();
--/

View File

@ -49,7 +49,7 @@ INSERT INTO hs_hosting.asset_legacy_id(uuid, legacy_id)
-- ============================================================================
--changeset hs-hosting-asset-MIGRATION-insert-trigger:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function insertassetLegacyIdMapping()
create or replace function hs_hosting.asset_insert_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -64,17 +64,17 @@ begin
return NEW;
end; $$;
create trigger createassetLegacyIdMapping
create trigger insert_legacy_id_mapping_tg
after insert on hs_hosting.asset
for each row
execute procedure insertassetLegacyIdMapping();
execute procedure hs_hosting.asset_insert_legacy_id_mapping_tf();
--/
-- ============================================================================
--changeset hs-hosting-asset-MIGRATION-delete-trigger:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
create or replace function deleteassetLegacyIdMapping_tf()
create or replace function hs_hosting.asset_delete_legacy_id_mapping_tf()
returns trigger
language plpgsql
strict as $$
@ -89,8 +89,8 @@ begin
return OLD;
end; $$;
create trigger deleteassetLegacyIdMapping_tg
create trigger delete_legacy_id_mapping_tg
before delete on hs_hosting.asset
for each row
execute procedure deleteassetLegacyIdMapping_tf();
execute procedure hs_hosting.asset_delete_legacy_id_mapping_tf();
--/

View File

@ -7,7 +7,7 @@ spring:
url-tc: jdbc:tc:postgresql:15.5-bookworm:///spring_boot_testcontainers
url-tcx: jdbc:tc:postgresql:15.5-bookworm:///spring_boot_testcontainers?TC_REUSABLE=true&TC_DAEMON=true
url-local: jdbc:postgresql://localhost:5432/postgres
url: ${spring.datasource.url-tc}
url: ${spring.datasource.url-local}
username: postgres
password: password