2022-06-08 14:22:58 +02:00
|
|
|
DROP TABLE IF EXISTS points;
|
2022-09-06 18:20:44 +02:00
|
|
|
DROP TABLE IF EXISTS redeem_queue;
|
2022-06-08 14:22:58 +02:00
|
|
|
|
|
|
|
CREATE TABLE points (
|
|
|
|
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
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE redeem_queue (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
redeem TEXT,
|
|
|
|
redeemer_id TEXT,
|
|
|
|
FOREIGN KEY (redeemer_id) REFERENCES points (id)
|
2022-06-08 14:22:58 +02:00
|
|
|
);
|