remove old db constraint

Fixes: https://pagure.io/koji/issue/1789
This commit is contained in:
Tomas Kopecek 2019-11-13 11:46:25 +01:00
parent 1ef565f80f
commit eb850998e0
2 changed files with 12 additions and 0 deletions

View file

@ -60,5 +60,7 @@ ALTER TABLE host_channels ADD CONSTRAINT active_revoke_sane CHECK (
ALTER TABLE host_channels ADD PRIMARY KEY (create_event, host_id, channel_id);
ALTER TABLE host_channels ADD UNIQUE (host_id, channel_id, active);
ALTER TABLE host_channels DROP CONSTRAINT host_channels_host_id_channel_id_key;
-- drop potential very old constraint (https://pagure.io/koji/issue/1789)
ALTER TABLE host_channels DROP CONSTRAINT IF EXISTS host_channels_host_id_key;
COMMIT;

View file

@ -0,0 +1,10 @@
-- upgrade script to migrate the Koji database schema
-- from version 1.19 to 1.20
BEGIN;
-- drop potential very old constraint (https://pagure.io/koji/issue/1789)
ALTER TABLE host_channels DROP CONSTRAINT IF EXISTS host_channels_host_id_key;
COMMIT;