From d92f642810dc3125515d64f953d2bee840de1cc1 Mon Sep 17 00:00:00 2001
From: fusion32 <marcopuzziello@gmail.com>
Date: Fri, 17 Oct 2025 16:12:31 -0300
Subject: world startup/shutdown timestamps + adjust a few column names

---
 sqlite/schema.sql | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

(limited to 'sqlite/schema.sql')

diff --git a/sqlite/schema.sql b/sqlite/schema.sql
index 106c780..ead3908 100644
--- a/sqlite/schema.sql
+++ b/sqlite/schema.sql
@@ -11,8 +11,10 @@ CREATE TABLE IF NOT EXISTS Worlds (
 	PremiumPlayerBuffer INTEGER NOT NULL,
 	MaxNewbies INTEGER NOT NULL,
 	PremiumNewbieBuffer INTEGER NOT NULL,
-	OnlineRecord INTEGER NOT NULL DEFAULT 0,
-	OnlineRecordTimestamp INTEGER NOT NULL DEFAULT 0,
+	OnlinePeak INTEGER NOT NULL DEFAULT 0,
+	OnlinePeakTimestamp INTEGER NOT NULL DEFAULT 0,
+	LastStartup INTEGER NOT NULL DEFAULT 0,
+	LastShutdown INTEGER NOT NULL DEFAULT 0,
 	PRIMARY KEY (WorldID),
 	UNIQUE (Name)
 );
@@ -59,15 +61,15 @@ CREATE INDEX IF NOT EXISTS CharactersGuildIndex
 ALTER TABLE Characters ADD GroupID INTEGER NOT NULL;
 CREATE TABLE IF NOT EXISTS CharacterRights (
 	GroupID INTEGER NOT NULL,
-	Right TEXT NOT NULL COLLATE NOCASE,
-	PRIMARY KEY(GroupID, Right)
+	Name TEXT NOT NULL COLLATE NOCASE,
+	PRIMARY KEY(GroupID, Name)
 );
 */
 
 CREATE TABLE IF NOT EXISTS CharacterRights (
 	CharacterID INTEGER NOT NULL,
-	Right TEXT NOT NULL COLLATE NOCASE,
-	PRIMARY KEY(CharacterID, Right)
+	Name TEXT NOT NULL COLLATE NOCASE,
+	PRIMARY KEY(CharacterID, Name)
 );
 
 CREATE TABLE IF NOT EXISTS CharacterDeaths (
-- 
cgit v1.2.3

