add db models, refactor json models, add references in migrations

This commit is contained in:
lbenedar
2026-04-06 16:40:49 +03:00
parent a16edb9b61
commit 095dac5db7
28 changed files with 709 additions and 259 deletions

View File

@@ -1,12 +1,13 @@
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
state_id INTEGER NOT NULL,
name VARCHAR(256) NOT NULL,
role INTEGER NOT NULL,
character VARCHAR(128) NOT NULL,
color VARCHAR(128) NOT NULL,
pronouns VARCHAR(128) NOT NULL,
created_at DATETIME NOT NULL DEFAULT current_timestamp
created_at DATETIME NOT NULL DEFAULT current_timestamp,
FOREIGN KEY (state_id) REFERENCES foundry_state(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS users_hotbar (