summaryrefslogtreecommitdiff
path: root/database.sql
diff options
context:
space:
mode:
Diffstat (limited to 'database.sql')
-rw-r--r--database.sql24
1 files changed, 24 insertions, 0 deletions
diff --git a/database.sql b/database.sql
index 3436b2c..cff3e93 100644
--- a/database.sql
+++ b/database.sql
@@ -22,4 +22,28 @@ CREATE TABLE IF NOT EXISTS emotes (
ext TEXT NOT NULL,
uploaded_by INTEGER REFERENCES users(id),
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE TABLE IF NOT EXISTS emote_sets (
+ id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ owner_id INTEGER NOT NULL REFERENCES users(id),
+ linked_to INTEGER REFERENCES emote_sets(id),
+ name TEXT NOT NULL,
+ size INTEGER
+);
+
+CREATE TABLE IF NOT EXISTS emote_set_contents (
+ id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ emote_set_id INTEGER NOT NULL REFERENCES emote_sets(id),
+ emote_id INTEGER NOT NULL REFERENCES emotes(id),
+ name TEXT,
+ added_by INTEGER NOT NULL REFERENCES users(id),
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE TABLE IF NOT EXISTS acquired_emote_sets (
+ id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ user_id INTEGER NOT NULL,
+ emote_set_id INTEGER NOT NULL,
+ is_default BOOLEAN NOT NULL DEFAULT false
); \ No newline at end of file