Initial giu version, not very good looking, maybe prefer CharmBracelet Tea

This commit is contained in:
Pablu
2025-10-28 19:13:43 +01:00
parent 396b531013
commit e2d39f715f
10 changed files with 313 additions and 56 deletions

42
test.sql Normal file
View File

@@ -0,0 +1,42 @@
CREATE TABLE TEST(
ID text PRIMARY KEY
);
CREATE TABLE IF NOT EXISTS users (
email text PRIMARY KEY,
username text
);
CREATE TABLE IF NOT EXISTS sessions (
session_id text PRIMARY KEY,
access_token text NOT NULL,
user_email text NOT NULL,
FOREIGN KEY(user_email) REFERENCES users(email)
);
CREATE TABLE IF NOT EXISTS game_settings (
lobby_id text PRIMARY KEY,
max_players integer,
game_mode text,
selected_playlist_id text
);
CREATE TABLE IF NOT EXISTS lobbys (
lobby_id text PRIMARY KEY,
host_email text,
game_settings_id text,
FOREIGN KEY(game_settings_id) REFERENCES game_settings(lobby_id),
FOREIGN KEY(host_email) REFERENCES users(email)
);
CREATE TABLE IF NOT EXISTS users_in_lobbys (
user_email text PRIMARY KEY,
lobby_id text,
FOREIGN KEY(user_email) REFERENCES users(email),
FOREIGN KEY(lobby_id) REFERENCES lobbys(lobby_id)
);
CREATE TABLE IF NOT EXISTS auth_states (
state_id text PRIMARY KEY,
code_verifier text NOT NULL
);