Use ON DELETE CASCADE and TEXT instead of enums
[gruntmaster-data.git] / lib / Gruntmaster / Data / Result / Problem.pm
index 05b6de94f14f935a306cc682ed0ad6afb6ab2ec3..5b843919c7250507743fc5d542be7012a138aeb6 100644 (file)
@@ -40,20 +40,17 @@ __PACKAGE__->table("problems");
 
 =head2 generator
 
-  data_type: 'enum'
-  extra: {custom_type_name => "generator",list => ["File","Run","Undef"]}
+  data_type: 'text'
   is_nullable: 0
 
 =head2 judge
 
-  data_type: 'enum'
-  extra: {custom_type_name => "judge",list => ["Absolute","Points"]}
+  data_type: 'text'
   is_nullable: 0
 
 =head2 level
 
-  data_type: 'enum'
-  extra: {custom_type_name => "plevel",list => ["beginner","easy","medium","hard"]}
+  data_type: 'text'
   is_nullable: 0
 
 =head2 name
@@ -80,8 +77,7 @@ __PACKAGE__->table("problems");
 
 =head2 runner
 
-  data_type: 'enum'
-  extra: {custom_type_name => "runner",list => ["File","Verifier","Interactive"]}
+  data_type: 'text'
   is_nullable: 0
 
 =head2 statement
@@ -139,26 +135,11 @@ __PACKAGE__->add_columns(
   "writer",
   { data_type => "text", is_nullable => 1 },
   "generator",
-  {
-    data_type => "enum",
-    extra => { custom_type_name => "generator", list => ["File", "Run", "Undef"] },
-    is_nullable => 0,
-  },
+  { data_type => "text", is_nullable => 0 },
   "judge",
-  {
-    data_type => "enum",
-    extra => { custom_type_name => "judge", list => ["Absolute", "Points"] },
-    is_nullable => 0,
-  },
+  { data_type => "text", is_nullable => 0 },
   "level",
-  {
-    data_type => "enum",
-    extra => {
-      custom_type_name => "plevel",
-      list => ["beginner", "easy", "medium", "hard"],
-    },
-    is_nullable => 0,
-  },
+  { data_type => "text", is_nullable => 0 },
   "name",
   { data_type => "text", is_nullable => 0 },
   "olimit",
@@ -168,14 +149,7 @@ __PACKAGE__->add_columns(
   "private",
   { data_type => "boolean", default_value => \"false", is_nullable => 0 },
   "runner",
-  {
-    data_type => "enum",
-    extra => {
-      custom_type_name => "runner",
-      list => ["File", "Verifier", "Interactive"],
-    },
-    is_nullable => 0,
-  },
+  { data_type => "text", is_nullable => 0 },
   "statement",
   { data_type => "text", is_nullable => 0 },
   "testcnt",
@@ -267,7 +241,7 @@ __PACKAGE__->belongs_to(
   "owner",
   "Gruntmaster::Data::Result::User",
   { id => "owner" },
-  { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
+  { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
 );
 
 =head2 contests
@@ -281,8 +255,8 @@ Composing rels: L</contest_problems> -> contest
 __PACKAGE__->many_to_many("contests", "contest_problems", "contest");
 
 
-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-30 12:59:34
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ujwyMJ5Pup1i5NKXkPkg2g
+# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-05-16 15:03:32
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tvap77v0faSMxFiLu1uggQ
 
 sub is_private {
        my ($self, $time) = @_;
This page took 0.011463 seconds and 4 git commands to generate.