]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BinaryVersion.pm
handle affects properly and upgrade schema
[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
39 =head1 ACCESSORS
40
41 =head2 src_pkg
42
43   data_type: 'text'
44   is_nullable: 1
45
46 =head2 src_ver
47
48   data_type: 'debversion'
49   is_nullable: 1
50
51 =head2 bin_pkg
52
53   data_type: 'text'
54   is_nullable: 1
55
56 =head2 arch
57
58   data_type: 'text'
59   is_nullable: 1
60
61 =head2 bin_ver
62
63   data_type: 'debversion'
64   is_nullable: 1
65
66 =head2 src_ver_based_on
67
68   data_type: 'debversion'
69   is_nullable: 1
70
71 =head2 src_pkg_based_on
72
73   data_type: 'text'
74   is_nullable: 1
75
76 =cut
77
78 __PACKAGE__->add_columns(
79   "src_pkg",
80   { data_type => "text", is_nullable => 1 },
81   "src_ver",
82   { data_type => "debversion", is_nullable => 1 },
83   "bin_pkg",
84   { data_type => "text", is_nullable => 1 },
85   "arch",
86   { data_type => "text", is_nullable => 1 },
87   "bin_ver",
88   { data_type => "debversion", is_nullable => 1 },
89   "src_ver_based_on",
90   { data_type => "debversion", is_nullable => 1 },
91   "src_pkg_based_on",
92   { data_type => "text", is_nullable => 1 },
93 );
94
95
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
98
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;
108 EOF
109
110 # You can replace this text with custom code or comments, and it will be preserved on regeneration
111 1;