From: Marius Gavrilescu Date: Sat, 6 Dec 2014 22:52:05 +0000 (+0200) Subject: Add a "solution" column to problem X-Git-Tag: 5999.000_011~1 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=1980106af1ddfc94f721d2a3152ae558c591b75b;p=gruntmaster-data.git Add a "solution" column to problem --- diff --git a/db.sql b/db.sql index 0daf347..1556202 100644 --- a/db.sql +++ b/db.sql @@ -32,6 +32,7 @@ CREATE TABLE problems ( owner TEXT NOT NULL REFERENCES users ON DELETE CASCADE, private BOOLEAN NOT NULL DEFAULT FALSE, runner TEXT NOT NULL, + solution TEXT , statement TEXT NOT NULL, testcnt INT NOT NULL, tests TEXT, diff --git a/lib/Gruntmaster/Data/Result/Problem.pm b/lib/Gruntmaster/Data/Result/Problem.pm index 0f4667e..098701e 100644 --- a/lib/Gruntmaster/Data/Result/Problem.pm +++ b/lib/Gruntmaster/Data/Result/Problem.pm @@ -80,6 +80,11 @@ __PACKAGE__->table("problems"); data_type: 'text' is_nullable: 0 +=head2 solution + + data_type: 'text' + is_nullable: 1 + =head2 statement data_type: 'text' @@ -150,6 +155,8 @@ __PACKAGE__->add_columns( { data_type => "boolean", default_value => \"false", is_nullable => 0 }, "runner", { data_type => "text", is_nullable => 0 }, + "solution", + { data_type => "text", is_nullable => 1 }, "statement", { data_type => "text", is_nullable => 0 }, "testcnt", @@ -255,8 +262,8 @@ Composing rels: L -> contest __PACKAGE__->many_to_many("contests", "contest_problems", "contest"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-01 14:39:28 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/p3BIfVYSG5AKSSgVgOoOQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-07 00:51:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KjAtOerTqBqtcMrBtwJ3Bw sub is_private { my ($self, $time) = @_;