From 32471030d432eb8d3cef4af8bb00790f3b9f089c Mon Sep 17 00:00:00 2001
From: ilotterytea <iltsu@alright.party>
Date: Tue, 17 Jun 2025 22:30:05 +0500
Subject: feat: we are using SQL databases now

---
 database.sql | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 database.sql

(limited to 'database.sql')

diff --git a/database.sql b/database.sql
new file mode 100644
index 0000000..b7efa83
--- /dev/null
+++ b/database.sql
@@ -0,0 +1,19 @@
+CREATE TABLE IF NOT EXISTS files (
+    id CHAR(32) NOT NULL PRIMARY KEY,
+    mime TEXT NOT NULL,
+    extension TEXT NOT NULL,
+    size BIGINT NOT NULL,
+    title TEXT,
+    password TEXT,
+    uploaded_at TIMESTAMP NOT NULL DEFAULT UTC_TIMESTAMP,
+    expires_at TIMESTAMP,
+    views BIGINT NOT NULL DEFAULT 0
+);
+
+CREATE TABLE IF NOT EXISTS file_metadata (
+    id CHAR(32) NOT NULL PRIMARY KEY REFERENCES files(id) ON DELETE CASCADE,
+    width BIGINT,
+    height BIGINT,
+    duration BIGINT,
+    line_count BIGINT
+);
\ No newline at end of file
-- 
cgit v1.2.3

