diff options
author | Yorhel <git@yorhel.nl> | 2022-03-17 11:09:36 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2022-04-01 06:50:11 +0200 |
commit | c6a60fc12a7540ca1b4c8fb39dc62c16e7c05af5 (patch) | |
tree | 74fabfa02f62424105569af3010c1d9957d73660 /util | |
parent | e5ee22d027c0b303f961ef3de5f0800a2170da7d (diff) |
Add user traits feature
Diffstat (limited to 'util')
-rw-r--r-- | util/updates/2022-04-01-user-traits.sql | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/updates/2022-04-01-user-traits.sql b/util/updates/2022-04-01-user-traits.sql new file mode 100644 index 00000000..a99b3d3a --- /dev/null +++ b/util/updates/2022-04-01-user-traits.sql @@ -0,0 +1,8 @@ +CREATE TABLE users_traits ( + id vndbid NOT NULL, + tid vndbid NOT NULL, + PRIMARY KEY(id, tid) +); +ALTER TABLE users_traits ADD CONSTRAINT users_traits_id_fkey FOREIGN KEY (id) REFERENCES users (id) ON DELETE CASCADE; +ALTER TABLE users_traits ADD CONSTRAINT users_traits_tid_fkey FOREIGN KEY (tid) REFERENCES traits (id); +GRANT SELECT, INSERT, UPDATE, DELETE ON users_traits TO vndb_site; |