Enha: removing memcache [WIP]

This commit is contained in:
Grail Finder
2025-07-02 09:17:11 +03:00
parent 86574bf69c
commit 95a55a8213
4 changed files with 43 additions and 21 deletions

View File

@ -4,7 +4,7 @@ CREATE TABLE rooms (
id TEXT PRIMARY KEY,
created_at TIMESTAMP NOT NULL,
creator_name TEXT NOT NULL,
team_turn TEXT,
team_turn TEXT NOT NULL DEFAULT '',
this_turn_limit INTEGER,
opened_this_turn INTEGER,
blue_counter INTEGER,
@ -13,19 +13,19 @@ CREATE TABLE rooms (
mime_done BOOLEAN,
is_public BOOLEAN,
is_running BOOLEAN,
language TEXT,
language TEXT NOT NULL DEFAULT '',
round_time INTEGER,
is_over BOOLEAN,
team_won TEXT,
room_pass TEXT
team_won TEXT NOT NULL DEFAULT '',
room_pass TEXT NOT NULL DEFAULT ''
);
CREATE TABLE players (
id INTEGER PRIMARY KEY AUTOINCREMENT,
room_id TEXT NOT NULL,
username TEXT NOT NULL,
team TEXT, -- 'red' or 'blue'
role TEXT, -- 'guesser' or 'mime'
team TEXT NOT NULL DEFAULT '', -- 'red' or 'blue'
role TEXT NOT NULL DEFAULT '', -- 'guesser' or 'mime'
is_bot BOOLEAN DEFAULT FALSE,
FOREIGN KEY (room_id) REFERENCES rooms(id)
);
@ -34,7 +34,7 @@ CREATE TABLE word_cards (
id INTEGER PRIMARY KEY AUTOINCREMENT,
room_id TEXT NOT NULL,
word TEXT NOT NULL,
color TEXT,
color TEXT NOT NULL DEFAULT '',
revealed BOOLEAN DEFAULT FALSE,
mime_view BOOLEAN DEFAULT FALSE,
FOREIGN KEY (room_id) REFERENCES rooms(id)
@ -52,11 +52,21 @@ CREATE TABLE actions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
room_id TEXT NOT NULL,
actor TEXT NOT NULL,
actor_color TEXT,
actor_color TEXT NOT NULL DEFAULT '',
action_type TEXT NOT NULL,
word TEXT,
word_color TEXT,
number_associated TEXT, -- for clues
word TEXT NOT NULL DEFAULT '',
word_color TEXT NOT NULL DEFAULT '',
number_associated TEXT NOT NULL DEFAULT '', -- for clues
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (room_id) REFERENCES rooms(id)
);
CREATE TABLE settings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
room_id TEXT NOT NULL,
language TEXT NOT NULL DEFAULT 'en',
room_pass TEXT NOT NULL DEFAULT '',
turn_time INTEGER NOT NULL DEFAULT 60, -- seconds
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (room_id) REFERENCES rooms(id)
);