Enha: use of sql sessions

This commit is contained in:
Grail Finder
2025-07-03 08:15:54 +03:00
parent 130ed3763b
commit e02554b181
10 changed files with 36 additions and 25 deletions

View File

@ -72,7 +72,7 @@ CREATE TABLE sessions(
id INTEGER PRIMARY KEY AUTOINCREMENT,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
lifetime INTEGER NOT NULL DEFAULT 3600,
cookie_token TEXT NOT NULL DEFAULT '', -- encoded value
token_key TEXT NOT NULL DEFAULT '' UNIQUE, -- encoded value
username TEXT NOT NULL,
FOREIGN KEY (username) REFERENCES players(username)
);