From 312b5d6e873d53b78db4bef628fe01391a30cdb0 Mon Sep 17 00:00:00 2001
From: ilotterytea <iltsu@alright.party>
Date: Wed, 18 Jun 2025 15:00:49 +0500
Subject: feat: file bans

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

(limited to 'database.sql')

diff --git a/database.sql b/database.sql
index b7efa83..47f7ea6 100644
--- a/database.sql
+++ b/database.sql
@@ -16,4 +16,15 @@ CREATE TABLE IF NOT EXISTS file_metadata (
     height BIGINT,
     duration BIGINT,
     line_count BIGINT
+);
+
+CREATE TABLE IF NOT EXISTS hash_bans (
+    sha256 CHAR(64) PRIMARY KEY,
+    reason TEXT
+);
+
+CREATE TABLE IF NOT EXISTS file_bans (
+    id CHAR(32) NOT NULL PRIMARY KEY REFERENCES files(id) ON DELETE CASCADE,
+    hash_ban CHAR(64) NOT NULL REFERENCES hash_bans(sha256) ON DELETE CASCADE,
+    banned_at TIMESTAMP NOT NULL DEFAULT UTC_TIMESTAMP
 );
\ No newline at end of file
-- 
cgit v1.2.3

