3 passphrase
TEXT, -- NOT NULL,
4 admin BOOLEAN NOT NULL DEFAULT FALSE,
5 name TEXT, -- NOT NULL,
6 email
TEXT, -- NOT NULL,
7 phone
TEXT, -- NOT NULL,
8 town
TEXT, -- NOT NULL,
9 university
TEXT, -- NOT NULL,
10 level TEXT, -- NOT NULL,
14 CREATE TABLE contests (
19 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE,
20 CONSTRAINT positive_duration
CHECK (stop
> start)
23 CREATE TABLE contest_status (
24 contest
TEXT NOT NULL REFERENCES contests
ON DELETE CASCADE,
25 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE,
29 PRIMARY KEY (owner, contest
)
32 CREATE TABLE problems (
36 generator
TEXT NOT NULL,
41 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE,
42 private
BOOLEAN NOT NULL DEFAULT FALSE,
45 statement TEXT NOT NULL,
48 timeout
REAL NOT NULL,
56 CREATE TABLE contest_problems (
57 contest
TEXT REFERENCES contests
ON DELETE CASCADE,
58 problem
TEXT NOT NULL REFERENCES problems
ON DELETE CASCADE,
59 PRIMARY KEY (contest
, problem
)
63 id SERIAL
PRIMARY KEY,
64 contest
TEXT REFERENCES contests
ON DELETE CASCADE,
68 extension
TEXT NOT NULL,
70 private
BOOLEAN NOT NULL DEFAULT FALSE,
71 problem
TEXT NOT NULL REFERENCES problems
ON DELETE CASCADE,
76 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE
79 CREATE TABLE problem_status (
80 problem
TEXT NOT NULL REFERENCES problems
ON DELETE CASCADE,
81 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE,
82 job SERIAL
NOT NULL REFERENCES jobs
ON DELETE CASCADE,
83 solved
BOOLEAN NOT NULL DEFAULT FALSE,
85 PRIMARY KEY (owner, problem
)
89 contest
TEXT NOT NULL REFERENCES contests
ON DELETE CASCADE,
90 problem
TEXT NOT NULL REFERENCES problems
ON DELETE CASCADE,
91 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE,
93 PRIMARY KEY (contest
, problem
, owner)
96 CREATE TABLE table_comments (
97 table_name TEXT NOT NULL PRIMARY KEY,
98 comment_text
TEXT NOT NULL
101 CREATE TABLE column_comments (
102 table_name TEXT NOT NULL,
103 column_name TEXT NOT NULL,
104 comment_text
TEXT NOT NULL,
105 PRIMARY KEY (table_name, column_name)
108 INSERT INTO table_comments
VALUES ('users', 'List of users');
109 INSERT INTO table_comments
VALUES ('contests', 'List of contests');
110 INSERT INTO table_comments
VALUES ('contest_status', 'List of (contest, user, result)');
111 INSERT INTO table_comments
VALUES ('problems', 'List of problems');
112 INSERT INTO table_comments
VALUES ('contest_problems', 'Many-to-many bridge between contests and problems');
113 INSERT INTO table_comments
VALUES ('jobs', 'List of jobs');
114 INSERT INTO table_comments
VALUES ('problem_status', 'List of (problem, user, result)');
115 INSERT INTO table_comments
VALUES ('opens', 'List of (contest, problem, user, time when user opened problem)');
117 INSERT INTO column_comments
VALUES ('users', 'passphrase', 'RFC2307-encoded passphrase');
118 INSERT INTO column_comments
VALUES ('users', 'name', 'Full name of user');
119 INSERT INTO column_comments
VALUES ('users', 'level', 'Highschool, Undergraduate, Master, Doctorate or Other');
120 INSERT INTO column_comments
VALUES ('users', 'lastjob', 'Unix time when this user last submitted a job');
122 INSERT INTO column_comments
VALUES ('contests', 'start', 'Unix time when contest starts');
123 INSERT INTO column_comments
VALUES ('contests', 'stop', 'Unix time when contest ends');
125 INSERT INTO column_comments
VALUES ('problems', 'author', 'Full name(s) of problem author(s)/problemsetter(s)/tester(s)/etc');
126 INSERT INTO column_comments
VALUES ('problems', 'writer', 'Full name(s) of statement writer(s) (DEPRECATED)');
127 INSERT INTO column_comments
VALUES ('problems', 'generator', 'Generator class, without the leading Gruntmaster::Daemon::Generator::');
128 INSERT INTO column_comments
VALUES ('problems', 'runner', 'Runner class, without the leading Gruntmaster::Daemon::Runner::');
129 INSERT INTO column_comments
VALUES ('problems', 'judge', 'Judge class, without the leading Gruntmaster::Daemon::Judge::');
130 INSERT INTO column_comments
VALUES ('problems', 'level', 'Problem level, one of beginner, easy, medium, hard');
131 INSERT INTO column_comments
VALUES ('problems', 'olimit', 'Output limit (in bytes)');
132 INSERT INTO column_comments
VALUES ('problems', 'timeout', 'Time limit (in seconds)');
133 INSERT INTO column_comments
VALUES ('problems', 'solution', 'Solution (HTML)');
134 INSERT INTO column_comments
VALUES ('problems', 'statement', 'Statement (HTML)');
135 INSERT INTO column_comments
VALUES ('problems', 'testcnt', 'Number of tests');
136 INSERT INTO column_comments
VALUES ('problems', 'tests', 'JSON array of test values for ::Runner::File');
137 INSERT INTO column_comments
VALUES ('problems', 'value', 'Problem value when used in a contest.');
138 INSERT INTO column_comments
VALUES ('problems', 'genformat', 'Format (programming language) of the generator if using the Run generator');
139 INSERT INTO column_comments
VALUES ('problems', 'gensource', 'Source code of generator if using the Run generator');
140 INSERT INTO column_comments
VALUES ('problems', 'verformat', 'Format (programming language) of the verifier if using the Verifier runner');
141 INSERT INTO column_comments
VALUES ('problems', 'versource', 'Source code of verifier if using the Verifier runner');
143 INSERT INTO column_comments
VALUES ('jobs', 'daemon', 'hostname:PID of daemon that last executed this job. NULL if never executed');
144 INSERT INTO column_comments
VALUES ('jobs', 'date', 'Unix time when job was submitted');
145 INSERT INTO column_comments
VALUES ('jobs', 'errors', 'Compiler errors');
146 INSERT INTO column_comments
VALUES ('jobs', 'extension', 'File extension of submitted program, without a leading dot');
147 INSERT INTO column_comments
VALUES ('jobs', 'format', 'Format (programming language) of submitted program');
148 INSERT INTO column_comments
VALUES ('jobs', 'result', 'Job result (integer constant from Gruntmaster::Daemon::Constants)');
149 INSERT INTO column_comments
VALUES ('jobs', 'result_text', 'Job result (human-readable text)');
150 INSERT INTO column_comments
VALUES ('jobs', 'results', 'Per-test results (JSON array of hashes with keys id (test number, counting from 1), result (integer constant from Gruntmaster::Daemon::Constants), result_text (human-readable text), time (execution time in decimal seconds))');
152 INSERT INTO column_comments
VALUES ('problem_status', 'solved', 'True if the result is Accepted, False otherwise');
This page took 0.02546 seconds and 5 git commands to generate.