From 86d7d3102489db9f592eea283161a3ed1c91ed76 Mon Sep 17 00:00:00 2001
From: ilotterytea <iltsu@alright.party>
Date: Thu, 21 Aug 2025 16:43:12 +0500
Subject: feat: access tokens

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

(limited to 'database.sql')

diff --git a/database.sql b/database.sql
index 27962fa..a339619 100644
--- a/database.sql
+++ b/database.sql
@@ -3,4 +3,11 @@ CREATE TABLE IF NOT EXISTS users (
     username TEXT NOT NULL UNIQUE,
     `password` TEXT NOT NULL,
     joined_at TIMESTAMP NOT NULL DEFAULT UTC_TIMESTAMP
+);
+
+CREATE TABLE IF NOT EXISTS tokens (
+    id BIGINT PRIMARY KEY AUTO_INCREMENT,
+    user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+    `hash` TEXT NOT NULL UNIQUE,
+    expires_at TIMESTAMP NOT NULL
 );
\ No newline at end of file
-- 
cgit v1.2.3

