Remove unique constraint of user_id and event_types on webhooks table

This commit is contained in:
Hongbo Wu 2023-03-09 14:53:06 +08:00
parent 071c3799c2
commit b206f8e6b1
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,9 @@
-- Type: DO
-- Name: remove_unique_key_on_webhooks
-- Description: Remove unique constraint of user_id and event_types on webhooks table
BEGIN;
ALTER TABLE omnivore.webhooks DROP CONSTRAINT webhooks_user_id_event_types_key;
COMMIT;

View file

@ -0,0 +1,9 @@
-- Type: UNDO
-- Name: remove_unique_key_on_webhooks
-- Description: Remove unique constraint of user_id and event_types on webhooks table
BEGIN;
ALTER TABLE omnivore.webhooks ADD CONSTRAINT webhooks_user_id_event_types_key UNIQUE (user_id, event_types);
COMMIT;