2 package Debbugs::DB::Result::BugPackage;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Debbugs::DB::Result::BugPackage
16 use base 'DBIx::Class::Core';
18 =head1 COMPONENTS LOADED
22 =item * L<DBIx::Class::InflateColumn::DateTime>
24 =item * L<DBIx::Class::TimeStamp>
30 __PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
31 __PACKAGE__->table_class("DBIx::Class::ResultSource::View");
33 =head1 TABLE: C<bug_package>
37 __PACKAGE__->table("bug_package");
38 __PACKAGE__->result_source_instance->view_definition(" SELECT b.bug,\n b.bin_pkg AS pkg_id,\n 'binary'::text AS pkg_type,\n bp.pkg AS package\n FROM (bug_binpackage b\n JOIN bin_pkg bp ON ((bp.id = b.bin_pkg)))\nUNION\n SELECT s.bug,\n s.src_pkg AS pkg_id,\n 'source'::text AS pkg_type,\n sp.pkg AS package\n FROM (bug_srcpackage s\n JOIN src_pkg sp ON ((sp.id = s.src_pkg)))\nUNION\n SELECT b.bug,\n b.bin_pkg AS pkg_id,\n 'binary_affects'::text AS pkg_type,\n bp.pkg AS package\n FROM (bug_affects_binpackage b\n JOIN bin_pkg bp ON ((bp.id = b.bin_pkg)))\nUNION\n SELECT s.bug,\n s.src_pkg AS pkg_id,\n 'source_affects'::text AS pkg_type,\n sp.pkg AS package\n FROM (bug_affects_srcpackage s\n JOIN src_pkg sp ON ((sp.id = s.src_pkg)))");
64 __PACKAGE__->add_columns(
66 { data_type => "integer", is_nullable => 1 },
68 { data_type => "integer", is_nullable => 1 },
70 { data_type => "text", is_nullable => 1 },
72 { data_type => "text", is_nullable => 1 },
76 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-04-13 11:30:02
77 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2Nrl+KO8b94gK5GcCkdNcw
79 __PACKAGE__->result_source_instance->view_definition(<<EOF);
80 SELECT b.bug,b.bin_pkg,'binary',bp.pkg FROM bug_binpackage b JOIN bin_pkg bp ON bp.id=b.bin_pkg UNION
81 SELECT s.bug,s.src_pkg,'source',sp.pkg FROM bug_srcpackage s JOIN src_pkg sp ON sp.id=s.src_pkg;
85 # You can replace this text with custom code or comments, and it will be preserved on regeneration