From 5b70c98de20d69e04474a42e450d5f48fdc588e8 Mon Sep 17 00:00:00 2001 From: Tim Purschke Date: Wed, 5 Nov 2025 08:54:31 +0100 Subject: [PATCH] do change earlier as it is missing in 8.8.9 --- roles/database/files/upgrade/8.8.9.sql | 4 ++++ roles/database/files/upgrade/8.9.1.sql | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/database/files/upgrade/8.8.9.sql b/roles/database/files/upgrade/8.8.9.sql index 95b7402a2..3c4e8b526 100644 --- a/roles/database/files/upgrade/8.8.9.sql +++ b/roles/database/files/upgrade/8.8.9.sql @@ -44,6 +44,10 @@ alter table owner add column if not exists next_recert_date Timestamp; alter table owner drop constraint if exists owner_last_recertifier_uiuser_uiuser_id_f_key; alter table owner add constraint owner_last_recertifier_uiuser_uiuser_id_f_key foreign key (last_recertifier) references uiuser (uiuser_id) on update restrict; +alter table recertification add column if not exists owner_recert_id bigint; + +alter table recertification drop constraint if exists recertification_owner_recertification_foreign_key; +ALTER TABLE recertification ADD CONSTRAINT recertification_owner_recertification_foreign_key FOREIGN KEY (owner_recert_id) REFERENCES owner_recertification(id) ON UPDATE RESTRICT ON DELETE CASCADE; DO $$ BEGIN diff --git a/roles/database/files/upgrade/8.9.1.sql b/roles/database/files/upgrade/8.9.1.sql index 614c54d9f..bcabadd84 100644 --- a/roles/database/files/upgrade/8.9.1.sql +++ b/roles/database/files/upgrade/8.9.1.sql @@ -9,7 +9,3 @@ ALTER TABLE owner_recertification ADD CONSTRAINT owner_recertification_report_fo alter table owner add column if not exists recert_active boolean default false; -alter table recertification add column if not exists owner_recert_id bigint; - -alter table recertification drop constraint if exists recertification_owner_recertification_foreign_key; -ALTER TABLE recertification ADD CONSTRAINT recertification_owner_recertification_foreign_key FOREIGN KEY (owner_recert_id) REFERENCES owner_recertification(id) ON UPDATE RESTRICT ON DELETE CASCADE;