2.0.0-rc1 : Profile and achievements update.

This commit is contained in:
2026-08-09 00:50:45 +08:00
parent 562775e5db
commit 3874bf57a9
31 changed files with 2618 additions and 108 deletions
Binary file not shown.
+32
View File
@@ -48,6 +48,38 @@ CREATE UNIQUE INDEX IF NOT EXISTS idx_team_lineups_single_active
ON team_lineups(is_active)
WHERE is_active = 1;
CREATE TABLE IF NOT EXISTS team_roster_versions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
effective_from INTEGER NOT NULL,
effective_to INTEGER,
is_current INTEGER NOT NULL DEFAULT 0,
notes TEXT,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CHECK (effective_to IS NULL OR effective_to >= effective_from)
);
CREATE UNIQUE INDEX IF NOT EXISTS idx_roster_versions_single_current
ON team_roster_versions(is_current)
WHERE is_current = 1;
CREATE INDEX IF NOT EXISTS idx_roster_versions_period
ON team_roster_versions(effective_from, effective_to);
CREATE TABLE IF NOT EXISTS team_roster_members (
roster_version_id INTEGER NOT NULL,
steam_id_64 TEXT NOT NULL,
member_role TEXT NOT NULL DEFAULT 'member'
CHECK (member_role IN ('starter', 'substitute', 'member')),
position_order INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (roster_version_id, steam_id_64),
FOREIGN KEY (roster_version_id)
REFERENCES team_roster_versions(id) ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS idx_roster_members_player
ON team_roster_members(steam_id_64, roster_version_id);
CREATE TABLE IF NOT EXISTS wiki_pages (
id INTEGER PRIMARY KEY AUTOINCREMENT,
path TEXT NOT NULL UNIQUE,