From 85d3f015cc4e11f00adba9d3a99cb69c7f77156b Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Wed, 26 Mar 2014 15:25:57 +0200 Subject: [PATCH] Add genformat & gensource to db.sql, rerun dbicdump --- db.sql | 2 ++ lib/Gruntmaster/Data/Result/Job.pm | 8 ++++---- lib/Gruntmaster/Data/Result/Problem.pm | 22 ++++++++++++++++++---- lib/Gruntmaster/Data/Result/User.pm | 11 +++++++++-- lib/Gruntmaster/OldData.pm | 2 +- 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/db.sql b/db.sql index e4decc2..ab499d8 100644 --- a/db.sql +++ b/db.sql @@ -40,6 +40,8 @@ CREATE TABLE problems ( tests TEXT, timeout REAL NOT NULL, value INT, + genformat TEXT, + gensource TEXT, verformat TEXT, versource TEXT ); diff --git a/lib/Gruntmaster/Data/Result/Job.pm b/lib/Gruntmaster/Data/Result/Job.pm index b52ddfc..1b283a3 100644 --- a/lib/Gruntmaster/Data/Result/Job.pm +++ b/lib/Gruntmaster/Data/Result/Job.pm @@ -85,7 +85,7 @@ __PACKAGE__->table("jobs"); =head2 results - data_type: 'json' + data_type: 'text' is_nullable: 1 =head2 source @@ -130,7 +130,7 @@ __PACKAGE__->add_columns( "result_text", { data_type => "text", is_nullable => 1 }, "results", - { data_type => "json", is_nullable => 1 }, + { data_type => "text", is_nullable => 1 }, "source", { data_type => "text", is_nullable => 0 }, "owner", @@ -202,8 +202,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-24 09:25:07 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mDHQWFk/K7q/nHu+Z3a0+A +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-26 15:24:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dnYOXMU6Or/Wh0m5A1N5UA # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/Gruntmaster/Data/Result/Problem.pm b/lib/Gruntmaster/Data/Result/Problem.pm index 6b12ac5..18e1852 100644 --- a/lib/Gruntmaster/Data/Result/Problem.pm +++ b/lib/Gruntmaster/Data/Result/Problem.pm @@ -31,7 +31,7 @@ __PACKAGE__->table("problems"); =head2 author data_type: 'text' - is_nullable: 0 + is_nullable: 1 =head2 generator @@ -104,6 +104,16 @@ __PACKAGE__->table("problems"); data_type: 'integer' is_nullable: 1 +=head2 genformat + + data_type: 'text' + is_nullable: 1 + +=head2 gensource + + data_type: 'text' + is_nullable: 1 + =head2 verformat data_type: 'text' @@ -120,7 +130,7 @@ __PACKAGE__->add_columns( "id", { data_type => "text", is_nullable => 0 }, "author", - { data_type => "text", is_nullable => 0 }, + { data_type => "text", is_nullable => 1 }, "generator", { data_type => "enum", @@ -169,6 +179,10 @@ __PACKAGE__->add_columns( { data_type => "real", is_nullable => 0 }, "value", { data_type => "integer", is_nullable => 1 }, + "genformat", + { data_type => "text", is_nullable => 1 }, + "gensource", + { data_type => "text", is_nullable => 1 }, "verformat", { data_type => "text", is_nullable => 1 }, "versource", @@ -260,8 +274,8 @@ Composing rels: L -> contest __PACKAGE__->many_to_many("contests", "contest_problems", "contest"); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-24 09:25:07 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dZicbasR8lUFGhIabrWxXw +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-26 15:24:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QeM8iOMQE3lqG2tXKbpRxw # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/Gruntmaster/Data/Result/User.pm b/lib/Gruntmaster/Data/Result/User.pm index 740d87a..21edb48 100644 --- a/lib/Gruntmaster/Data/Result/User.pm +++ b/lib/Gruntmaster/Data/Result/User.pm @@ -38,6 +38,11 @@ __PACKAGE__->table("users"); data_type: 'text' is_nullable: 1 +=head2 phone + + data_type: 'text' + is_nullable: 1 + =head2 town data_type: 'text' @@ -67,6 +72,8 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 1 }, "email", { data_type => "text", is_nullable => 1 }, + "phone", + { data_type => "text", is_nullable => 1 }, "town", { data_type => "text", is_nullable => 1 }, "university", @@ -152,8 +159,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-06 12:41:16 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CHRtUlZf3hs+lg6Nqi2LPA +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-26 15:24:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HjxrnH2QdWGaAnArZpyYMA # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/Gruntmaster/OldData.pm b/lib/Gruntmaster/OldData.pm index d3ac62d..d873516 100644 --- a/lib/Gruntmaster/OldData.pm +++ b/lib/Gruntmaster/OldData.pm @@ -78,7 +78,7 @@ sub defhash{ defhash problem => qw/name level difficulty statement owner author private generator runner judge testcnt timeout olimit/; defhash contest => qw/start end name owner/; defhash job => qw/date errors extension filesize private problem result result_text user/; -defhash user => qw/name email lastjob town university level/; +defhash user => qw/name email lastjob phone town university level/; sub clean_job (_){ HDEL cp . "job.$_[0]", qw/result result_text results daemon/ -- 2.30.2