time BIGINT NOT NULL,
PRIMARY KEY (contest, problem, owner)
);
+
+CREATE TABLE table_comments (
+ table_name TEXT NOT NULL PRIMARY KEY,
+ comment_text TEXT NOT NULL
+);
+
+CREATE TABLE column_comments (
+ table_name TEXT NOT NULL,
+ column_name TEXT NOT NULL,
+ comment_text TEXT NOT NULL,
+ PRIMARY KEY (table_name, column_name)
+);
+
+INSERT INTO table_comments VALUES ('users', 'List of users');
+INSERT INTO table_comments VALUES ('contests', 'List of contests');
+INSERT INTO table_comments VALUES ('contest_status', 'List of (contest, user, result)');
+INSERT INTO table_comments VALUES ('problems', 'List of problems');
+INSERT INTO table_comments VALUES ('contest_problems', 'Many-to-many bridge between contests and problems');
+INSERT INTO table_comments VALUES ('jobs', 'List of jobs');
+INSERT INTO table_comments VALUES ('problem_status', 'List of (problem, user, result)');
+INSERT INTO table_comments VALUES ('opens', 'List of (contest, problem, user, time when user opened problem)');
+
+INSERT INTO column_comments VALUES ('users', 'passphrase', 'RFC2307-encoded passphrase');
+INSERT INTO column_comments VALUES ('users', 'name', 'Full name of user');
+INSERT INTO column_comments VALUES ('users', 'level', 'Highschool, Undergraduate, Master, Doctorate or Other');
+INSERT INTO column_comments VALUES ('users', 'lastjob', 'Unix time when this user last submitted a job');
+
+INSERT INTO column_comments VALUES ('contests', 'start', 'Unix time when contest starts');
+INSERT INTO column_comments VALUES ('contests', 'stop', 'Unix time when contest ends');
+
+INSERT INTO column_comments VALUES ('problems', 'author', 'Full name(s) of problem author(s)/problemsetter(s)/tester(s)/etc');
+INSERT INTO column_comments VALUES ('problems', 'writer', 'Full name(s) of statement writer(s) (DEPRECATED)');
+INSERT INTO column_comments VALUES ('problems', 'generator', 'Generator class, without the leading Gruntmaster::Daemon::Generator::');
+INSERT INTO column_comments VALUES ('problems', 'runner', 'Runner class, without the leading Gruntmaster::Daemon::Runner::');
+INSERT INTO column_comments VALUES ('problems', 'judge', 'Judge class, without the leading Gruntmaster::Daemon::Judge::');
+INSERT INTO column_comments VALUES ('problems', 'level', 'Problem level, one of beginner, easy, medium, hard');
+INSERT INTO column_comments VALUES ('problems', 'olimit', 'Output limit (in bytes)');
+INSERT INTO column_comments VALUES ('problems', 'timeout', 'Time limit (in seconds)');
+INSERT INTO column_comments VALUES ('problems', 'solution', 'Solution (HTML)');
+INSERT INTO column_comments VALUES ('problems', 'statement', 'Statement (HTML)');
+INSERT INTO column_comments VALUES ('problems', 'testcnt', 'Number of tests');
+INSERT INTO column_comments VALUES ('problems', 'tests', 'JSON array of test values for ::Runner::File');
+INSERT INTO column_comments VALUES ('problems', 'value', 'Problem value when used in a contest.');
+INSERT INTO column_comments VALUES ('problems', 'genformat', 'Format (programming language) of the generator if using the Run generator');
+INSERT INTO column_comments VALUES ('problems', 'gensource', 'Source code of generator if using the Run generator');
+INSERT INTO column_comments VALUES ('problems', 'verformat', 'Format (programming language) of the verifier if using the Verifier runner');
+INSERT INTO column_comments VALUES ('problems', 'versource', 'Source code of verifier if using the Verifier runner');
+
+INSERT INTO column_comments VALUES ('jobs', 'daemon', 'hostname:PID of daemon that last executed this job. NULL if never executed');
+INSERT INTO column_comments VALUES ('jobs', 'date', 'Unix time when job was submitted');
+INSERT INTO column_comments VALUES ('jobs', 'errors', 'Compiler errors');
+INSERT INTO column_comments VALUES ('jobs', 'extension', 'File extension of submitted program, without a leading dot');
+INSERT INTO column_comments VALUES ('jobs', 'format', 'Format (programming language) of submitted program');
+INSERT INTO column_comments VALUES ('jobs', 'result', 'Job result (integer constant from Gruntmaster::Daemon::Constants)');
+INSERT INTO column_comments VALUES ('jobs', 'result_text', 'Job result (human-readable text)');
+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))');
+
+INSERT INTO column_comments VALUES ('problem_status', 'solved', 'True if the result is Accepted, False otherwise');
=head1 NAME
-Gruntmaster::Data::Result::Problem
+Gruntmaster::Data::Result::Problem - List of problems
=cut
data_type: 'text'
is_nullable: 1
+Full name(s) of problem author(s)/problemsetter(s)/tester(s)/etc
+
=head2 writer
data_type: 'text'
is_nullable: 1
+Full name(s) of statement writer(s) (DEPRECATED)
+
=head2 generator
data_type: 'text'
is_nullable: 0
+Generator class, without the leading Gruntmaster::Daemon::Generator::
+
=head2 judge
data_type: 'text'
is_nullable: 0
+Judge class, without the leading Gruntmaster::Daemon::Judge::
+
=head2 level
data_type: 'text'
is_nullable: 0
+Problem level, one of beginner, easy, medium, hard
+
=head2 name
data_type: 'text'
data_type: 'integer'
is_nullable: 1
+Output limit (in bytes)
+
=head2 owner
data_type: 'text'
data_type: 'text'
is_nullable: 0
+Runner class, without the leading Gruntmaster::Daemon::Runner::
+
=head2 solution
data_type: 'text'
is_nullable: 1
+Solution (HTML)
+
=head2 statement
data_type: 'text'
is_nullable: 0
+Statement (HTML)
+
=head2 testcnt
data_type: 'integer'
is_nullable: 0
+Number of tests
+
=head2 tests
data_type: 'text'
is_nullable: 1
+JSON array of test values for ::Runner::File
+
=head2 timeout
data_type: 'real'
is_nullable: 0
+Time limit (in seconds)
+
=head2 value
data_type: 'integer'
is_nullable: 0
+Problem value when used in a contest.
+
=head2 genformat
data_type: 'text'
is_nullable: 1
+Format (programming language) of the generator if using the Run generator
+
=head2 gensource
data_type: 'text'
is_nullable: 1
+Source code of generator if using the Run generator
+
=head2 verformat
data_type: 'text'
is_nullable: 1
+Format (programming language) of the verifier if using the Verifier runner
+
=head2 versource
data_type: 'text'
is_nullable: 1
+Source code of verifier if using the Verifier runner
+
=cut
__PACKAGE__->add_columns(
__PACKAGE__->many_to_many("contests", "contest_problems", "contest");
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-11 23:51:27
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1SnNCeJdFr5lM3mmO6rtqA
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:54:00
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QZHyWOWaPmTm/EQ5M22CGA
sub is_private {
my ($self, $time) = @_;