-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sql
More file actions
53 lines (48 loc) · 1.14 KB
/
install.sql
File metadata and controls
53 lines (48 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
CREATE TABLE IF NOT EXISTS mmr_team (
account_id TEXT UNIQUE,
nickname TEXT,
mmr FLOAT DEFAULT 0,
mu FLOAT DEFAULT 0,
sigma FLOAT DEFAULT 0,
matches_won INTEGER DEFAULT 0,
matches_lost INTEGER DEFAULT 0
);
CREATE TABLE IF NOT EXISTS mmr_ffa (
account_id TEXT UNIQUE,
nickname TEXT,
mmr FLOAT DEFAULT 0,
mu FLOAT DEFAULT 0,
sigma FLOAT DEFAULT 0,
matches_won INTEGER DEFAULT 0,
matches_lost INTEGER DEFAULT 0
);
CREATE TABLE IF NOT EXISTS matches (
match_id INTEGER PRIMARY KEY AUTOINCREMENT,
server_name TEXT,
server_id TEXT,
arena TEXT,
game_mode TEXT,
winners TEXT,
losers TEXT,
win_score INTEGER,
lose_score INTEGER,
event_match_multiplier FLOAT DEFAULT 1,
match_start_date TIMESTAMP,
match_end_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS associations (
child_id TEXT UNIQUE,
parent_id TEXT UNIQUE
);
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY,
name TEXT,
last_login TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
ip TEXT,
user_agent TEXT,
user_lang TEXT
);
CREATE TABLE IF NOT EXISTS authorized_servers (
api_key TEXT PRIMARY KEY,
server_id TEXT NOT NULL
);