From 3b6c6e5774dec41a16da03d1bb8497b448cfa564 Mon Sep 17 00:00:00 2001
From: ilotterytea <iltsu@alright.party>
Date: Sun, 20 Apr 2025 10:46:32 +0500
Subject: feat: users, account management, authentication system

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

(limited to 'database.sql')

diff --git a/database.sql b/database.sql
index 644345e..ccd4c7e 100644
--- a/database.sql
+++ b/database.sql
@@ -1,7 +1,25 @@
+CREATE TABLE IF NOT EXISTS "users" (
+    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+    "username" TEXT NOT NULL UNIQUE,
+    "password" TEXT,
+    "secret_key" TEXT NOT NULL,
+    "joined_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE TABLE IF NOT EXISTS "connections" (
+    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+    "user_id" INTEGER NOT NULL,
+    "alias_id" TEXT NOT NULL,
+    "platform" TEXT NOT NULL,
+    "data" TEXT NOT NULL,
+    "connected_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
 CREATE TABLE IF NOT EXISTS "emotes" (
     "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
     "code" TEXT NOT NULL,
     "mime" TEXT NOT NULL,
     "ext" TEXT NOT NULL,
+    "uploaded_by" INTEGER,
     "created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
 );
\ No newline at end of file
-- 
cgit v1.2.3

