changeset 451:392ac133a491 pg-transactions

fix downgrade proc
author Alain Mazy <am@osimis.io>
date Wed, 17 Jan 2024 19:31:23 +0100
parents c437ec7be2b0
children 6780dd8b0a66
files PostgreSQL/Plugins/SQL/Downgrades/V6.2ToV6.1.sql
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/PostgreSQL/Plugins/SQL/Downgrades/V6.2ToV6.1.sql	Wed Jan 17 17:30:08 2024 +0100
+++ b/PostgreSQL/Plugins/SQL/Downgrades/V6.2ToV6.1.sql	Wed Jan 17 19:31:23 2024 +0100
@@ -130,7 +130,13 @@
        );
 
 
--- this trigger has been removed in 6.2
+-- these triggers have been introduced in 6.2, remove them
+DROP TRIGGER IF EXISTS IncrementResourcesTracker on Resources;
+DROP TRIGGER IF EXISTS DecrementResourcesTracker on Resources;
+DROP FUNCTION IF EXISTS IncrementResourcesTrackerFunc;
+DROP FUNCTION IF EXISTS DecrementResourcesTrackerFunc;
+
+-- this trigger has been removed in 6.2, reinstall it
 CREATE OR REPLACE FUNCTION CountResourcesTrackerFunc()
 RETURNS TRIGGER AS $$
 BEGIN