]>
iEval git - gruntmaster-data.git/blob - db.sql
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,
13 since
BIGINT DEFAULT CAST ( EXTRACT ( epoch
from now ()) AS bigint )
16 CREATE TABLE contests (
23 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE ,
24 CONSTRAINT positive_duration
CHECK ( stop
> start )
27 CREATE TABLE contest_status (
28 contest
TEXT NOT NULL REFERENCES contests
ON DELETE CASCADE ,
29 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE ,
33 PRIMARY KEY ( owner , contest
)
36 CREATE TABLE problems (
40 generator
TEXT NOT NULL ,
45 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE ,
46 private
BOOLEAN NOT NULL DEFAULT FALSE ,
49 statement TEXT NOT NULL ,
53 timeout
REAL NOT NULL ,
61 CREATE TABLE contest_problems (
62 contest
TEXT REFERENCES contests
ON DELETE CASCADE ,
63 problem
TEXT NOT NULL REFERENCES problems
ON DELETE CASCADE ,
64 PRIMARY KEY ( contest
, problem
)
68 id SERIAL
PRIMARY KEY ,
69 contest
TEXT REFERENCES contests
ON DELETE CASCADE ,
73 extension
TEXT NOT NULL ,
75 private
BOOLEAN NOT NULL DEFAULT FALSE ,
76 problem
TEXT NOT NULL REFERENCES problems
ON DELETE CASCADE ,
82 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE
85 CREATE TABLE problem_status (
86 problem
TEXT NOT NULL REFERENCES problems
ON DELETE CASCADE ,
87 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE ,
88 job SERIAL
NOT NULL REFERENCES jobs
ON DELETE CASCADE ,
89 solved
BOOLEAN NOT NULL DEFAULT FALSE ,
91 PRIMARY KEY ( owner , problem
)
95 contest
TEXT NOT NULL REFERENCES contests
ON DELETE CASCADE ,
96 problem
TEXT NOT NULL REFERENCES problems
ON DELETE CASCADE ,
97 owner TEXT NOT NULL REFERENCES users
ON DELETE CASCADE ,
99 PRIMARY KEY ( contest
, problem
, owner )
102 CREATE TABLE limits (
103 problem
TEXT NOT NULL REFERENCES problems
ON DELETE CASCADE ,
104 format
TEXT NOT NULL ,
105 timeout
REAL NOT NULL ,
106 PRIMARY KEY ( problem
, format
)
109 CREATE TABLE table_comments (
110 table_name TEXT NOT NULL PRIMARY KEY ,
111 comment_text
TEXT NOT NULL
114 CREATE TABLE column_comments (
115 table_name TEXT NOT NULL ,
116 column_name TEXT NOT NULL ,
117 comment_text
TEXT NOT NULL ,
118 PRIMARY KEY ( table_name , column_name )
121 INSERT INTO table_comments
VALUES ( 'users' , 'List of users' );
122 INSERT INTO table_comments
VALUES ( 'contests' , 'List of contests' );
123 INSERT INTO table_comments
VALUES ( 'contest_status' , 'List of (contest, user, result)' );
124 INSERT INTO table_comments
VALUES ( 'problems' , 'List of problems' );
125 INSERT INTO table_comments
VALUES ( 'contest_problems' , 'Many-to-many bridge between contests and problems' );
126 INSERT INTO table_comments
VALUES ( 'jobs' , 'List of jobs' );
127 INSERT INTO table_comments
VALUES ( 'problem_status' , 'List of (problem, user, result)' );
128 INSERT INTO table_comments
VALUES ( 'opens' , 'List of (contest, problem, user, time when user opened problem)' );
129 INSERT INTO table_comments
VALUES ( 'limits' , 'Time limit overrides for certain problem/format pairs' );
131 INSERT INTO column_comments
VALUES ( 'users' , 'passphrase' , 'RFC2307-encoded passphrase' );
132 INSERT INTO column_comments
VALUES ( 'users' , 'name' , 'Full name of user' );
133 INSERT INTO column_comments
VALUES ( 'users' , 'level' , 'Highschool, Undergraduate, Master, Doctorate or Other' );
134 INSERT INTO column_comments
VALUES ( 'users' , 'lastjob' , 'Unix time when this user last submitted a job' );
135 INSERT INTO column_comments
VALUES ( 'users' , 'since' , 'Unix time when this user was created' );
137 INSERT INTO column_comments
VALUES ( 'contests' , 'start' , 'Unix time when contest starts' );
138 INSERT INTO column_comments
VALUES ( 'contests' , 'stop' , 'Unix time when contest ends' );
139 INSERT INTO column_comments
VALUES ( 'contests' , 'editorial' , 'HTML fragment placed before the editorial' );
140 INSERT INTO column_comments
VALUES ( 'contests' , 'description' , 'HTML fragment placed on contest page' );
142 INSERT INTO column_comments
VALUES ( 'problems' , 'author' , 'Full name(s) of problem author(s)/problemsetter(s)/tester(s)/etc' );
143 INSERT INTO column_comments
VALUES ( 'problems' , 'writer' , 'Full name(s) of statement writer(s) (DEPRECATED)' );
144 INSERT INTO column_comments
VALUES ( 'problems' , 'generator' , 'Generator class, without the leading Gruntmaster::Daemon::Generator::' );
145 INSERT INTO column_comments
VALUES ( 'problems' , 'runner' , 'Runner class, without the leading Gruntmaster::Daemon::Runner::' );
146 INSERT INTO column_comments
VALUES ( 'problems' , 'judge' , 'Judge class, without the leading Gruntmaster::Daemon::Judge::' );
147 INSERT INTO column_comments
VALUES ( 'problems' , 'level' , 'Problem level, one of beginner, easy, medium, hard' );
148 INSERT INTO column_comments
VALUES ( 'problems' , 'olimit' , 'Output limit (in bytes)' );
149 INSERT INTO column_comments
VALUES ( 'problems' , 'timeout' , 'Time limit (in seconds)' );
150 INSERT INTO column_comments
VALUES ( 'problems' , 'solution' , 'Solution (HTML)' );
151 INSERT INTO column_comments
VALUES ( 'problems' , 'statement' , 'Statement (HTML)' );
152 INSERT INTO column_comments
VALUES ( 'problems' , 'testcnt' , 'Number of tests' );
153 INSERT INTO column_comments
VALUES ( 'problems' , 'precnt' , 'Number of pretests. NULL indicates full feedback.' );
154 INSERT INTO column_comments
VALUES ( 'problems' , 'tests' , 'JSON array of test values for ::Runner::File' );
155 INSERT INTO column_comments
VALUES ( 'problems' , 'value' , 'Problem value when used in a contest.' );
156 INSERT INTO column_comments
VALUES ( 'problems' , 'genformat' , 'Format (programming language) of the generator if using the Run generator' );
157 INSERT INTO column_comments
VALUES ( 'problems' , 'gensource' , 'Source code of generator if using the Run generator' );
158 INSERT INTO column_comments
VALUES ( 'problems' , 'verformat' , 'Format (programming language) of the verifier if using the Verifier runner' );
159 INSERT INTO column_comments
VALUES ( 'problems' , 'versource' , 'Source code of verifier if using the Verifier runner' );
161 INSERT INTO column_comments
VALUES ( 'jobs' , 'daemon' , 'hostname:PID of daemon that last executed this job. NULL if never executed' );
162 INSERT INTO column_comments
VALUES ( 'jobs' , 'date' , 'Unix time when job was submitted' );
163 INSERT INTO column_comments
VALUES ( 'jobs' , 'errors' , 'Compiler errors' );
164 INSERT INTO column_comments
VALUES ( 'jobs' , 'extension' , 'File extension of submitted program, without a leading dot' );
165 INSERT INTO column_comments
VALUES ( 'jobs' , 'format' , 'Format (programming language) of submitted program' );
166 INSERT INTO column_comments
VALUES ( 'jobs' , 'reference' , 'If not null, this is a reference solution that should get this result. For example, set reference=0 on jobs that should be accepted, reference=3 on jobs that should get TLE, etc' );
167 INSERT INTO column_comments
VALUES ( 'jobs' , 'result' , 'Job result (integer constant from Gruntmaster::Daemon::Constants)' );
168 INSERT INTO column_comments
VALUES ( 'jobs' , 'result_text' , 'Job result (human-readable text)' );
169 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))' );
171 INSERT INTO column_comments
VALUES ( 'problem_status' , 'solved' , 'True if the result is Accepted, False otherwise' );
This page took 0.049324 seconds and 4 git commands to generate.