diff --git a/packages/db/migrations/0111.do.remove_unique_key_on_webhooks.sql b/packages/db/migrations/0111.do.remove_unique_key_on_webhooks.sql new file mode 100755 index 000000000..6142b79fe --- /dev/null +++ b/packages/db/migrations/0111.do.remove_unique_key_on_webhooks.sql @@ -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; diff --git a/packages/db/migrations/0111.undo.remove_unique_key_on_webhooks.sql b/packages/db/migrations/0111.undo.remove_unique_key_on_webhooks.sql new file mode 100755 index 000000000..8a0bd7c21 --- /dev/null +++ b/packages/db/migrations/0111.undo.remove_unique_key_on_webhooks.sql @@ -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;