From 0d85fb2fa3677b7f1a5176cd7ad2a84ff68c5101 Mon Sep 17 00:00:00 2001
From: ilotterytea <iltsu@alright.party>
Date: Tue, 5 Aug 2025 20:38:10 +0500
Subject: upd: new server fields

---
 database.sql | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'database.sql')

diff --git a/database.sql b/database.sql
index c15b2f2..9b46753 100644
--- a/database.sql
+++ b/database.sql
@@ -1,10 +1,12 @@
 CREATE TABLE IF NOT EXISTS servers (
     id INTEGER PRIMARY KEY AUTO_INCREMENT,
     host TEXT NOT NULL UNIQUE,
-    port INTEGER NOT NULL,
-    nick TEXT NOT NULL,
-    pass TEXT NOT NULL,
-    capabilities TEXT NOT NULL
+    port SMALLINT UNSIGNED NOT NULL,
+    nick TEXT,
+    pass TEXT,
+    capabilities TEXT,
+    added_at TIMESTAMP NOT NULL DEFAULT UTC_TIMESTAMP(),
+    UNIQUE (host, port)
 );
 
 CREATE TABLE IF NOT EXISTS rooms (
-- 
cgit v1.2.3

