summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-08-30 12:43:27 +0200
committerYorhel <git@yorhel.nl>2022-08-30 12:44:07 +0200
commitfe97972d35d0b3fdb525ee2f2f5fe05bf977b7fe (patch)
tree7d857deffcba3f1114cf5f95e26f603e5a1bae9d /util
parent34fabe3ebeb17119aac578bcb224fd9c74fb93ea (diff)
Also add trait overrides
Diffstat (limited to 'util')
-rw-r--r--util/updates/2022-08-30-tag-trait-prefs.sql (renamed from util/updates/wip-tag-prefs.sql)11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/updates/wip-tag-prefs.sql b/util/updates/2022-08-30-tag-trait-prefs.sql
index c5ee7312..db2bec02 100644
--- a/util/updates/wip-tag-prefs.sql
+++ b/util/updates/2022-08-30-tag-trait-prefs.sql
@@ -9,4 +9,15 @@ CREATE TABLE users_prefs_tags (
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;
+CREATE TABLE users_prefs_traits (
+ id vndbid NOT NULL,
+ tid vndbid NOT NULL,
+ spoil smallint NOT NULL,
+ childs boolean NOT NULL,
+ PRIMARY KEY(id, tid)
+);
+
+ALTER TABLE users_prefs_traits ADD CONSTRAINT users_prefs_traits_id_fkey FOREIGN KEY (id) REFERENCES users (id) ON DELETE CASCADE;
+ALTER TABLE users_prefs_traits ADD CONSTRAINT users_prefs_traits_tid_fkey FOREIGN KEY (tid) REFERENCES traits (id) ON DELETE CASCADE;
+
\i sql/perms.sql