Fix: on login add player once
This commit is contained in:
@ -90,7 +90,7 @@ CREATE TABLE journal(
|
||||
|
||||
CREATE TABLE player_stats (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
player_username TEXT NOT NULL UNIQUE,
|
||||
username TEXT NOT NULL UNIQUE,
|
||||
games_played INTEGER NOT NULL DEFAULT 0,
|
||||
games_won INTEGER NOT NULL DEFAULT 0,
|
||||
games_lost INTEGER NOT NULL DEFAULT 0,
|
||||
@ -101,6 +101,6 @@ CREATE TABLE player_stats (
|
||||
guesser_winrate REAL NOT NULL DEFAULT 0.0,
|
||||
played_as_mime INTEGER NOT NULL DEFAULT 0,
|
||||
played_as_guesser INTEGER NOT NULL DEFAULT 0,
|
||||
FOREIGN KEY (player_username) REFERENCES players(username) ON DELETE CASCADE
|
||||
FOREIGN KEY (username) REFERENCES players(username) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user