]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BinaryVersion.pm
426b725dfc801f04e85d6750d1bb1dfbdfff2041
[debbugs.git] / Debbugs / DB / Result / BinaryVersion.pm
1 use utf8;
2 package Debbugs::DB::Result::BinaryVersion;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Debbugs::DB::Result::BinaryVersion
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 COMPONENTS LOADED
19
20 =over 4
21
22 =item * L<DBIx::Class::InflateColumn::DateTime>
23
24 =item * L<DBIx::Class::TimeStamp>
25
26 =back
27
28 =cut
29
30 __PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
31 __PACKAGE__->table_class("DBIx::Class::ResultSource::View");
32
33 =head1 TABLE: C<binary_versions>
34
35 =cut
36
37 __PACKAGE__->table("binary_versions");
38 __PACKAGE__->result_source_instance->view_definition(" SELECT sp.pkg AS src_pkg,\n    sv.ver AS src_ver,\n    bp.pkg AS bin_pkg,\n    a.arch,\n    b.ver AS bin_ver,\n    svb.ver AS src_ver_based_on,\n    spb.pkg AS src_pkg_based_on\n   FROM ((((((bin_ver b\n     JOIN arch a ON ((b.arch = a.id)))\n     JOIN bin_pkg bp ON ((b.bin_pkg = bp.id)))\n     JOIN src_ver sv ON ((b.src_ver = sv.id)))\n     JOIN src_pkg sp ON ((sv.src_pkg = sp.id)))\n     LEFT JOIN src_ver svb ON ((sv.based_on = svb.id)))\n     LEFT JOIN src_pkg spb ON ((spb.id = svb.src_pkg)))");
39
40 =head1 ACCESSORS
41
42 =head2 src_pkg
43
44   data_type: 'text'
45   is_nullable: 1
46
47 =head2 src_ver
48
49   data_type: 'debversion'
50   is_nullable: 1
51
52 =head2 bin_pkg
53
54   data_type: 'text'
55   is_nullable: 1
56
57 =head2 arch
58
59   data_type: 'text'
60   is_nullable: 1
61
62 =head2 bin_ver
63
64   data_type: 'debversion'
65   is_nullable: 1
66
67 =head2 src_ver_based_on
68
69   data_type: 'debversion'
70   is_nullable: 1
71
72 =head2 src_pkg_based_on
73
74   data_type: 'text'
75   is_nullable: 1
76
77 =cut
78
79 __PACKAGE__->add_columns(
80   "src_pkg",
81   { data_type => "text", is_nullable => 1 },
82   "src_ver",
83   { data_type => "debversion", is_nullable => 1 },
84   "bin_pkg",
85   { data_type => "text", is_nullable => 1 },
86   "arch",
87   { data_type => "text", is_nullable => 1 },
88   "bin_ver",
89   { data_type => "debversion", is_nullable => 1 },
90   "src_ver_based_on",
91   { data_type => "debversion", is_nullable => 1 },
92   "src_pkg_based_on",
93   { data_type => "text", is_nullable => 1 },
94 );
95
96
97 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
98 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0MeJnGxBc8gdEoPE6Sn6Sw
99
100 __PACKAGE__->result_source_instance->view_definition(<<EOF);
101 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,
102 svb.ver AS src_ver_based_on, spb.pkg AS src_pkg_based_on
103 FROM bin_ver b JOIN arch a ON b.arch = a.id
104                       JOIN bin_pkg bp ON b.bin_pkg  = bp.id
105                JOIN src_ver sv ON b.src_ver  = sv.id
106                JOIN src_pkg sp ON sv.src_pkg = sp.id
107                LEFT OUTER JOIN src_ver svb ON sv.based_on = svb.id
108                LEFT OUTER JOIN src_pkg spb ON spb.id = svb.src_pkg;
109 EOF
110
111 # You can replace this text with custom code or comments, and it will be preserved on regeneration
112 1;