-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb-schema.sql
More file actions
34 lines (26 loc) · 738 Bytes
/
db-schema.sql
File metadata and controls
34 lines (26 loc) · 738 Bytes
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
CREATE TABLE users (
username TEXT,
variable TEXT,
value DOUBLE,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);
-- below are exact copies of users to save games mid-turn or to
-- restore previous turn
CREATE TABLE saved_users (
username TEXT,
variable TEXT,
value DOUBLE,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);
CREATE TABLE turned_users (
username TEXT,
variable TEXT,
value DOUBLE,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);
-- This table only lists land tiles that have been improved in some way
CREATE TABLE land (
x INT, y INT, variable TEXT, value DOUBLE,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);
-- NOTE: oid is an automatically defined column in SQLite3, but not in MySQL