]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BinVer.pm
handle affects properly and upgrade schema
[debbugs.git] / Debbugs / DB / Result / BinVer.pm
1 use utf8;
2 package Debbugs::DB::Result::BinVer;
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::BinVer - Binary versions
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
32 =head1 TABLE: C<bin_ver>
33
34 =cut
35
36 __PACKAGE__->table("bin_ver");
37
38 =head1 ACCESSORS
39
40 =head2 id
41
42   data_type: 'integer'
43   is_auto_increment: 1
44   is_nullable: 0
45   sequence: 'bin_ver_id_seq'
46
47 Binary version id
48
49 =head2 bin_pkg
50
51   data_type: 'integer'
52   is_foreign_key: 1
53   is_nullable: 0
54
55 Binary package id (matches bin_pkg)
56
57 =head2 src_ver
58
59   data_type: 'integer'
60   is_foreign_key: 1
61   is_nullable: 0
62
63 Source version (matchines src_ver)
64
65 =head2 arch
66
67   data_type: 'integer'
68   is_foreign_key: 1
69   is_nullable: 0
70
71 Architecture id (matches arch)
72
73 =head2 ver
74
75   data_type: 'debversion'
76   is_nullable: 0
77
78 Binary version
79
80 =cut
81
82 __PACKAGE__->add_columns(
83   "id",
84   {
85     data_type         => "integer",
86     is_auto_increment => 1,
87     is_nullable       => 0,
88     sequence          => "bin_ver_id_seq",
89   },
90   "bin_pkg",
91   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
92   "src_ver",
93   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
94   "arch",
95   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
96   "ver",
97   { data_type => "debversion", is_nullable => 0 },
98 );
99
100 =head1 PRIMARY KEY
101
102 =over 4
103
104 =item * L</id>
105
106 =back
107
108 =cut
109
110 __PACKAGE__->set_primary_key("id");
111
112 =head1 UNIQUE CONSTRAINTS
113
114 =head2 C<bin_ver_bin_pkg_id_arch_idx>
115
116 =over 4
117
118 =item * L</bin_pkg>
119
120 =item * L</arch>
121
122 =item * L</ver>
123
124 =back
125
126 =cut
127
128 __PACKAGE__->add_unique_constraint("bin_ver_bin_pkg_id_arch_idx", ["bin_pkg", "arch", "ver"]);
129
130 =head2 C<bin_ver_src_ver_id_arch_idx>
131
132 =over 4
133
134 =item * L</src_ver>
135
136 =item * L</arch>
137
138 =back
139
140 =cut
141
142 __PACKAGE__->add_unique_constraint("bin_ver_src_ver_id_arch_idx", ["src_ver", "arch"]);
143
144 =head1 RELATIONS
145
146 =head2 arch
147
148 Type: belongs_to
149
150 Related object: L<Debbugs::DB::Result::Arch>
151
152 =cut
153
154 __PACKAGE__->belongs_to(
155   "arch",
156   "Debbugs::DB::Result::Arch",
157   { id => "arch" },
158   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
159 );
160
161 =head2 bin_associations
162
163 Type: has_many
164
165 Related object: L<Debbugs::DB::Result::BinAssociation>
166
167 =cut
168
169 __PACKAGE__->has_many(
170   "bin_associations",
171   "Debbugs::DB::Result::BinAssociation",
172   { "foreign.bin" => "self.id" },
173   { cascade_copy => 0, cascade_delete => 0 },
174 );
175
176 =head2 bin_pkg
177
178 Type: belongs_to
179
180 Related object: L<Debbugs::DB::Result::BinPkg>
181
182 =cut
183
184 __PACKAGE__->belongs_to(
185   "bin_pkg",
186   "Debbugs::DB::Result::BinPkg",
187   { id => "bin_pkg" },
188   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
189 );
190
191 =head2 src_ver
192
193 Type: belongs_to
194
195 Related object: L<Debbugs::DB::Result::SrcVer>
196
197 =cut
198
199 __PACKAGE__->belongs_to(
200   "src_ver",
201   "Debbugs::DB::Result::SrcVer",
202   { id => "src_ver" },
203   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
204 );
205
206
207 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
208 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Jie49PiJahtnqmfkKQYtcw
209
210
211 # You can replace this text with custom code or comments, and it will be preserved on regeneration
212 1;