From 1980106af1ddfc94f721d2a3152ae558c591b75b Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 7 Dec 2014 00:52:05 +0200 Subject: [PATCH] Add a "solution" column to problem --- db.sql | 1 + lib/Gruntmaster/Data/Result/Problem.pm | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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) = @_; -- 2.39.2