From 34fabe3ebeb17119aac578bcb224fd9c74fb93ea Mon Sep 17 00:00:00 2001 From: Yorhel Date: Tue, 30 Aug 2022 10:42:09 +0200 Subject: Rename users_prefs_tags.tag -> tid, add update script --- util/updates/wip-tag-prefs.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 util/updates/wip-tag-prefs.sql (limited to 'util') diff --git a/util/updates/wip-tag-prefs.sql b/util/updates/wip-tag-prefs.sql new file mode 100644 index 00000000..c5ee7312 --- /dev/null +++ b/util/updates/wip-tag-prefs.sql @@ -0,0 +1,12 @@ +CREATE TABLE users_prefs_tags ( + id vndbid NOT NULL, + tid vndbid NOT NULL, + spoil smallint NOT NULL, + childs boolean NOT NULL, + PRIMARY KEY(id, tid) +); + +ALTER TABLE users_prefs_tags ADD CONSTRAINT users_prefs_tags_id_fkey FOREIGN KEY (id) REFERENCES users (id) ON DELETE CASCADE; +ALTER TABLE users_prefs_tags ADD CONSTRAINT users_prefs_tags_tid_fkey FOREIGN KEY (tid) REFERENCES tags (id) ON DELETE CASCADE; + +\i sql/perms.sql -- cgit v1.2.3