Add "reference" column to jobs
authorMarius Gavrilescu <marius@ieval.ro>
Mon, 16 Mar 2015 13:41:24 +0000 (15:41 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Mon, 16 Mar 2015 13:41:24 +0000 (15:41 +0200)
db.sql
lib/Gruntmaster/Data/Result/Job.pm

diff --git a/db.sql b/db.sql
index 706265ea6b49f0eff9ce6f6c220b6e74ad86d0e6..ba8a62198ee753f9c0e4a8cca78ea98528ff978b 100644 (file)
--- a/db.sql
+++ b/db.sql
@@ -74,6 +74,7 @@ CREATE TABLE jobs (
        format      TEXT    NOT NULL,
        private     BOOLEAN NOT NULL DEFAULT FALSE,
        problem     TEXT    NOT NULL REFERENCES problems ON DELETE CASCADE,
+       reference   INT,
        result      INT,
        result_text TEXT,
        results     TEXT,
@@ -154,6 +155,7 @@ INSERT INTO column_comments VALUES ('jobs', 'date', 'Unix time when job was subm
 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', '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');
 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))');
index 39d44bd81716ab02d910dceecfed6f6f9941ec84..b6abf02f3752212a4623807e929c91865a37e1ba 100644 (file)
@@ -83,6 +83,13 @@ Format (programming language) of submitted program
   is_foreign_key: 1
   is_nullable: 0
 
+=head2 reference
+
+  data_type: 'integer'
+  is_nullable: 1
+
+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
+
 =head2 result
 
   data_type: 'integer'
@@ -141,6 +148,8 @@ __PACKAGE__->add_columns(
   { data_type => "boolean", default_value => \"false", is_nullable => 0 },
   "problem",
   { data_type => "text", is_foreign_key => 1, is_nullable => 0 },
+  "reference",
+  { data_type => "integer", is_nullable => 1 },
   "result",
   { data_type => "integer", is_nullable => 1 },
   "result_text",
@@ -233,8 +242,8 @@ __PACKAGE__->has_many(
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:54:00
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hEAVL5heV13+nalSmgr0WA
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-03-16 15:40:48
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aaVaCgk198pT0kBGMefkkA
 
 use Class::Method::Modifiers qw/after/;
 
This page took 0.012256 seconds and 4 git commands to generate.