Skip to content
4 changes: 4 additions & 0 deletions roles/database/files/upgrade/8.8.9.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions roles/database/files/upgrade/8.9.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Loading