From 4beae0afa2016e16b404159e0bf767ed6c62fabf Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Thu, 2 Oct 2025 09:33:15 -0700 Subject: [PATCH] Refactor: Simplify ban logic to use only banned_until --- functions/api/schema.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/api/schema.js b/functions/api/schema.js index 1cb39c4..26d2f62 100644 --- a/functions/api/schema.js +++ b/functions/api/schema.js @@ -2,7 +2,10 @@ const schema = [ `CREATE TABLE IF NOT EXISTS users ( id INTEGER PRIMARY KEY, username TEXT UNIQUE NOT NULL, + email TEXT UNIQUE NOT NULL, role TEXT NOT NULL DEFAULT 'user' CHECK(role IN ('user', 'admin', 'owner')), + banned_until DATETIME DEFAULT NULL, + ip_address TEXT, created_at DATETIME DEFAULT CURRENT_TIMESTAMP );`, `CREATE TABLE IF NOT EXISTS subs (