From e14d60b78f976438a0cf848033f7b980969ac4aa Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jul 09 2019 17:34:36 +0000 Subject: update migration for notification optouts --- diff --git a/docs/schema-upgrade-1.17-1.18.sql b/docs/schema-upgrade-1.17-1.18.sql index be531dc..6dcb390 100644 --- a/docs/schema-upgrade-1.17-1.18.sql +++ b/docs/schema-upgrade-1.17-1.18.sql @@ -4,6 +4,14 @@ BEGIN; +-- new table for notifications' optouts +CREATE TABLE build_notifications_block ( + id SERIAL NOT NULL PRIMARY KEY, + user_id INTEGER NOT NULL REFERENCES users (id), + package_id INTEGER REFERENCES package (id), + tag_id INTEGER REFERENCES tag (id) +) WITHOUT OIDS; + -- add tgz to list of tar's extensions UPDATE archivetypes SET extensions = 'tar tar.gz tar.bz2 tar.xz tgz' WHERE name = 'tar'; INSERT INTO archivetypes (name, description, extensions) VALUES ('vhdx', 'Hyper-V Virtual Hard Disk v2 image', 'vhdx'); diff --git a/docs/schema.sql b/docs/schema.sql index 1f443eb..6a2bb70 100644 --- a/docs/schema.sql +++ b/docs/schema.sql @@ -728,7 +728,6 @@ CREATE TABLE build_notifications_block ( tag_id INTEGER REFERENCES tag (id) ) WITHOUT OIDS; - GRANT SELECT ON build, package, task, tag, tag_listing, tag_config, tag_inheritance, tag_packages, rpminfo TO PUBLIC;