From 53a2e84af1ef1f35d835ef439260157038c70a46 Mon Sep 17 00:00:00 2001
From: ilotterytea <iltsu@alright.party>
Date: Thu, 15 May 2025 01:44:01 +0500
Subject: feat: tags

---
 database.sql | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'database.sql')

diff --git a/database.sql b/database.sql
index 6ce0c96..5f3bfbc 100644
--- a/database.sql
+++ b/database.sql
@@ -30,6 +30,17 @@ CREATE TABLE IF NOT EXISTS emotes (
     visibility INTEGER NOT NULL
 );
 
+CREATE TABLE IF NOT EXISTS tags (
+    id CHAR(32) NOT NULL PRIMARY KEY DEFAULT REPLACE(UUID(),'-',''),
+    code TEXT NOT NULL UNIQUE
+);
+
+CREATE TABLE IF NOT EXISTS tag_assigns (
+    id CHAR(32) NOT NULL PRIMARY KEY DEFAULT REPLACE(UUID(),'-',''),
+    tag_id CHAR(32) NOT NULL REFERENCES tags(id) ON DELETE CASCADE,
+    emote_id CHAR(32) NOT NULL REFERENCES emote(id) ON DELETE CASCADE
+);
+
 CREATE TABLE IF NOT EXISTS emote_sets (
     id CHAR(32) NOT NULL PRIMARY KEY DEFAULT REPLACE(UUID(),'-',''),
     owner_id CHAR(32) NOT NULL REFERENCES users(id) ON DELETE CASCADE,
-- 
cgit v1.2.3

