2 package Debbugs::DB::Result::BinaryVersion;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Debbugs::DB::Result::BinaryVersion
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<binary_versions>
37 __PACKAGE__->table("binary_versions");
48 data_type: 'debversion'
63 data_type: 'debversion'
66 =head2 src_ver_based_on
68 data_type: 'debversion'
71 =head2 src_pkg_based_on
78 __PACKAGE__->add_columns(
80 { data_type => "text", is_nullable => 1 },
82 { data_type => "debversion", is_nullable => 1 },
84 { data_type => "text", is_nullable => 1 },
86 { data_type => "text", is_nullable => 1 },
88 { data_type => "debversion", is_nullable => 1 },
90 { data_type => "debversion", is_nullable => 1 },
92 { data_type => "text", is_nullable => 1 },
96 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
97 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fH11OTb1r9SS1Ps9tM6WPQ
99 __PACKAGE__->result_source_instance->view_definition(<<EOF);
100 SELECT sp.pkg AS src_pkg, sv.ver AS src_ver, bp.pkg AS bin_pkg, a.arch AS arch, b.ver AS bin_ver,
101 svb.ver AS src_ver_based_on, spb.pkg AS src_pkg_based_on
102 FROM bin_ver b JOIN arch a ON b.arch = a.id
103 JOIN bin_pkg bp ON b.bin_pkg = bp.id
104 JOIN src_ver sv ON b.src_ver = sv.id
105 JOIN src_pkg sp ON sv.src_pkg = sp.id
106 LEFT OUTER JOIN src_ver svb ON sv.based_on = svb.id
107 LEFT OUTER JOIN src_pkg spb ON spb.id = svb.src_pkg;
110 # You can replace this text with custom code or comments, and it will be preserved on regeneration