diff options
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 6 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 10 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Questionnaire.pm | 48 |
3 files changed, 59 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 73c5876d6..53337c6e7 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -51,7 +51,7 @@ __PACKAGE__->add_columns( "user_id", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "anonymous", - { data_type => "boolean", is_nullable => 1 }, + { data_type => "boolean", is_nullable => 0 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( @@ -68,8 +68,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-18 11:45:22 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1HsEtlhxEN6I/umfbrswSw +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-20 12:11:12 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3w16OBO6ExapfttNqJzjpA # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index d91e8c324..0dc673f23 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -92,10 +92,16 @@ __PACKAGE__->belongs_to( { id => "user_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); +__PACKAGE__->has_many( + "questionnaires", + "FixMyStreet::DB::Result::Questionnaire", + { "foreign.problem_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); -# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-17 14:18:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LyIl4gkdC2Lo2vuddrEByQ +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-20 12:11:12 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qY08aYo4JBAg/aVmf/IzqQ =head2 check_for_errors diff --git a/perllib/FixMyStreet/DB/Result/Questionnaire.pm b/perllib/FixMyStreet/DB/Result/Questionnaire.pm new file mode 100644 index 000000000..db569e838 --- /dev/null +++ b/perllib/FixMyStreet/DB/Result/Questionnaire.pm @@ -0,0 +1,48 @@ +package FixMyStreet::DB::Result::Questionnaire; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +__PACKAGE__->load_components("FilterColumn"); +__PACKAGE__->table("questionnaire"); +__PACKAGE__->add_columns( + "id", + { + data_type => "integer", + is_auto_increment => 1, + is_nullable => 0, + sequence => "questionnaire_id_seq", + }, + "problem_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + "whensent", + { data_type => "timestamp", is_nullable => 0 }, + "whenanswered", + { data_type => "timestamp", is_nullable => 1 }, + "ever_reported", + { data_type => "boolean", is_nullable => 1 }, + "old_state", + { data_type => "text", is_nullable => 1 }, + "new_state", + { data_type => "text", is_nullable => 1 }, +); +__PACKAGE__->set_primary_key("id"); +__PACKAGE__->belongs_to( + "problem", + "FixMyStreet::DB::Result::Problem", + { id => "problem_id" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-20 12:11:12 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6CunhdbfTFdNnjhurkV0Gg + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; |