Files
omnivore/packages/db/migrations/0107.undo.grant_delete_permission_on_subscription.sql
Hongbo Wu d3f3a07f5e Fix typo
2023-01-18 14:44:12 +08:00

16 lines
453 B
PL/PgSQL
Executable File

-- Type: UNDO
-- Name: grant_delete_permission_to_subscription
-- Description: Add delete permission to subscription table
BEGIN;
REVOKE DELETE ON omnivore.subscriptions FROM omnivore_user;
ALTER TABLE omnivore.subscriptions
DROP CONSTRAINT subscriptions_newsletter_email_id_fkey,
ADD CONSTRAINT subscriptions_newsletter_email_id_fkey
FOREIGN KEY (newsletter_email_id)
REFERENCES omnivore.newsletter_emails (id);
COMMIT;