This repository has been archived on 2024-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
probotic/init.sql

39 lines
984 B
MySQL
Raw Normal View History

2023-08-02 12:00:27 -04:00
CREATE TABLE project (
title VARCHAR(64) NOT NULL,
body TEXT DEFAULT NULL,
difficulty INT NOT NULL DEFAULT 1 REFERENCES difficulty(diff),
trigger_date DATE DEFAULT NULL,
started DATE NOT NULL DEFAULT CURRENT_DATE,
span INT NOT NULL DEFAULT 7 -- time to last for in days
);
CREATE TABLE difficulty (
diff VARCHAR(16)
);
2023-08-02 12:04:57 -04:00
INSERT INTO difficulty VALUES('Easy');
INSERT INTO difficulty VALUES('Medium');
INSERT INTO difficulty VALUES('Hard');
INSERT INTO difficulty VALUES('Fuck You');
2023-08-02 12:00:27 -04:00
CREATE TABLE tag (
t VARCHAR(16)
);
-- Some default (not all) tags
INSERT INTO tag VALUES('AI');
2023-08-02 12:04:57 -04:00
INSERT INTO tag VALUES('Algorithm');
INSERT INTO tag VALUES('Calculators');
INSERT INTO tag VALUES('Games');
INSERT INTO tag VALUES('Math');
INSERT INTO tag VALUES('Networking');
INSERT INTO tag VALUES('Rendering');
INSERT INTO tag VALUES('Simulation');
INSERT INTO tag VALUES('Tools');
2023-08-02 12:00:27 -04:00
CREATE TABLE project_tag (
project INT REFERENCES project(rowid),
tag INT REFERENCES tag(rowid)
);