2022-10-13 14:23:31 +02:00
|
|
|
DROP TABLE IF EXISTS counters;
|
2022-09-06 18:20:44 +02:00
|
|
|
DROP TABLE IF EXISTS redeem_queue;
|
2023-03-15 14:11:11 +01:00
|
|
|
DROP TABLE IF EXISTS milestones;
|
2022-06-08 14:22:58 +02:00
|
|
|
|
2022-10-13 14:24:36 +02:00
|
|
|
CREATE TABLE IF NOT EXISTS points (
|
2022-06-08 14:22:58 +02:00
|
|
|
id TEXT PRIMARY KEY,
|
2022-09-06 18:20:44 +02:00
|
|
|
name TEXT,
|
2022-06-08 14:22:58 +02:00
|
|
|
points INTEGER
|
2022-09-06 18:20:44 +02:00
|
|
|
);
|
|
|
|
|
2023-03-14 14:15:18 +01:00
|
|
|
CREATE TABLE milestones (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
name TEXT NOT NULL,
|
2023-03-15 13:13:14 +01:00
|
|
|
progress INTEGER NOT NULL,
|
2023-03-20 13:23:20 +01:00
|
|
|
goal INTEGER NOT NULL,
|
|
|
|
complete BOOLEAN NOT NULL
|
2023-03-14 14:15:18 +01:00
|
|
|
);
|
|
|
|
|
2022-10-12 15:48:18 +02:00
|
|
|
CREATE TABLE counters (
|
2022-10-12 15:31:34 +02:00
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
2022-10-13 13:29:38 +02:00
|
|
|
name TEXT NOT NULL,
|
2022-10-12 15:31:34 +02:00
|
|
|
count INTEGER NOT NULL
|
2022-10-12 15:48:18 +02:00
|
|
|
);
|
2022-10-12 15:31:34 +02:00
|
|
|
|
2022-09-06 18:20:44 +02:00
|
|
|
CREATE TABLE redeem_queue (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
2022-10-12 15:31:34 +02:00
|
|
|
redeem TEXT NOT NULL,
|
|
|
|
redeemer_id TEXT NOT NULL,
|
|
|
|
note TEXT,
|
2022-09-06 18:20:44 +02:00
|
|
|
FOREIGN KEY (redeemer_id) REFERENCES points (id)
|
2022-06-08 14:22:58 +02:00
|
|
|
);
|