Update test database mocking
This commit is contained in:
parent
f7fa4c2085
commit
db85674601
|
@ -663,12 +663,34 @@ CREATE TABLE IF NOT EXISTS datasets (
|
||||||
last_sync INTEGER NOT NULL,
|
last_sync INTEGER NOT NULL,
|
||||||
game_id INTEGER NOT NULL,
|
game_id INTEGER NOT NULL,
|
||||||
game_name TEXT NOT NULL,
|
game_name TEXT NOT NULL,
|
||||||
|
game_slug TEXT NOT NULL,
|
||||||
country TEXT,
|
country TEXT,
|
||||||
state TEXT,
|
state TEXT,
|
||||||
|
set_limit INTEGER NOT NULL,
|
||||||
decay_rate REAL NOT NULL,
|
decay_rate REAL NOT NULL,
|
||||||
|
adj_decay_rate REAL NOT NULL,
|
||||||
period REAL NOT NULL,
|
period REAL NOT NULL,
|
||||||
tau REAL NOT NULL
|
tau REAL NOT NULL
|
||||||
) STRICT;";
|
) STRICT;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS players (
|
||||||
|
id INTEGER PRIMARY KEY,
|
||||||
|
discrim TEXT UNIQUE NOT NULL,
|
||||||
|
name TEXT NOT NULL,
|
||||||
|
prefix TEXT
|
||||||
|
) STRICT;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS events (
|
||||||
|
id INTEGER PRIMARY KEY,
|
||||||
|
slug TEXT NOT NULL
|
||||||
|
) STRICT;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS sets (
|
||||||
|
id TEXT UNIQUE NOT NULL,
|
||||||
|
event INTEGER NOT NULL,
|
||||||
|
FOREIGN KEY(event) REFERENCES events
|
||||||
|
) STRICT;
|
||||||
|
";
|
||||||
|
|
||||||
let connection = sqlite::open(":memory:")?;
|
let connection = sqlite::open(":memory:")?;
|
||||||
connection.execute(query)?;
|
connection.execute(query)?;
|
||||||
|
|
Loading…
Reference in a new issue