#1790 remove old db constraint
Merged 4 years ago by tkopecek. Opened 4 years ago by tkopecek.
tkopecek/koji issue1789  into  master

@@ -60,5 +60,7 @@ 

  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;

@@ -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;