]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/SrcVer.pm
Add bin and source associations
[debbugs.git] / Debbugs / DB / Result / SrcVer.pm
1 use utf8;
2 package Debbugs::DB::Result::SrcVer;
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::SrcVer
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 =back
25
26 =cut
27
28 __PACKAGE__->load_components("InflateColumn::DateTime");
29
30 =head1 TABLE: C<src_ver>
31
32 =cut
33
34 __PACKAGE__->table("src_ver");
35
36 =head1 ACCESSORS
37
38 =head2 id
39
40   data_type: 'integer'
41   is_auto_increment: 1
42   is_nullable: 0
43   sequence: 'src_ver_id_seq'
44
45 =head2 src_pkg_id
46
47   data_type: 'integer'
48   is_foreign_key: 1
49   is_nullable: 0
50
51 =head2 ver
52
53   data_type: 'debversion'
54   is_nullable: 0
55
56 =head2 maintainer_id
57
58   data_type: 'integer'
59   is_foreign_key: 1
60   is_nullable: 1
61
62 =head2 upload_date
63
64   data_type: 'timestamp with time zone'
65   default_value: current_timestamp
66   is_nullable: 0
67   original: {default_value => \"now()"}
68
69 =head2 based_on
70
71   data_type: 'integer'
72   is_foreign_key: 1
73   is_nullable: 1
74
75 =cut
76
77 __PACKAGE__->add_columns(
78   "id",
79   {
80     data_type         => "integer",
81     is_auto_increment => 1,
82     is_nullable       => 0,
83     sequence          => "src_ver_id_seq",
84   },
85   "src_pkg_id",
86   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
87   "ver",
88   { data_type => "debversion", is_nullable => 0 },
89   "maintainer_id",
90   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
91   "upload_date",
92   {
93     data_type     => "timestamp with time zone",
94     default_value => \"current_timestamp",
95     is_nullable   => 0,
96     original      => { default_value => \"now()" },
97   },
98   "based_on",
99   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
100 );
101
102 =head1 PRIMARY KEY
103
104 =over 4
105
106 =item * L</id>
107
108 =back
109
110 =cut
111
112 __PACKAGE__->set_primary_key("id");
113
114 =head1 UNIQUE CONSTRAINTS
115
116 =head2 C<src_ver_src_pkg_id_ver>
117
118 =over 4
119
120 =item * L</src_pkg_id>
121
122 =item * L</ver>
123
124 =back
125
126 =cut
127
128 __PACKAGE__->add_unique_constraint("src_ver_src_pkg_id_ver", ["src_pkg_id", "ver"]);
129
130 =head1 RELATIONS
131
132 =head2 based_on
133
134 Type: belongs_to
135
136 Related object: L<Debbugs::DB::Result::SrcVer>
137
138 =cut
139
140 __PACKAGE__->belongs_to(
141   "based_on",
142   "Debbugs::DB::Result::SrcVer",
143   { id => "based_on" },
144   {
145     is_deferrable => 1,
146     join_type     => "LEFT",
147     on_delete     => "CASCADE",
148     on_update     => "CASCADE",
149   },
150 );
151
152 =head2 bin_vers
153
154 Type: has_many
155
156 Related object: L<Debbugs::DB::Result::BinVer>
157
158 =cut
159
160 __PACKAGE__->has_many(
161   "bin_vers",
162   "Debbugs::DB::Result::BinVer",
163   { "foreign.src_ver_id" => "self.id" },
164   { cascade_copy => 0, cascade_delete => 0 },
165 );
166
167 =head2 bug_vers
168
169 Type: has_many
170
171 Related object: L<Debbugs::DB::Result::BugVer>
172
173 =cut
174
175 __PACKAGE__->has_many(
176   "bug_vers",
177   "Debbugs::DB::Result::BugVer",
178   { "foreign.src_ver_id" => "self.id" },
179   { cascade_copy => 0, cascade_delete => 0 },
180 );
181
182 =head2 maintainer
183
184 Type: belongs_to
185
186 Related object: L<Debbugs::DB::Result::Maintainer>
187
188 =cut
189
190 __PACKAGE__->belongs_to(
191   "maintainer",
192   "Debbugs::DB::Result::Maintainer",
193   { id => "maintainer_id" },
194   {
195     is_deferrable => 1,
196     join_type     => "LEFT",
197     on_delete     => "CASCADE",
198     on_update     => "CASCADE",
199   },
200 );
201
202 =head2 src_associations
203
204 Type: has_many
205
206 Related object: L<Debbugs::DB::Result::SrcAssociation>
207
208 =cut
209
210 __PACKAGE__->has_many(
211   "src_associations",
212   "Debbugs::DB::Result::SrcAssociation",
213   { "foreign.source" => "self.id" },
214   { cascade_copy => 0, cascade_delete => 0 },
215 );
216
217 =head2 src_pkg
218
219 Type: belongs_to
220
221 Related object: L<Debbugs::DB::Result::SrcPkg>
222
223 =cut
224
225 __PACKAGE__->belongs_to(
226   "src_pkg",
227   "Debbugs::DB::Result::SrcPkg",
228   { id => "src_pkg_id" },
229   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
230 );
231
232 =head2 src_vers
233
234 Type: has_many
235
236 Related object: L<Debbugs::DB::Result::SrcVer>
237
238 =cut
239
240 __PACKAGE__->has_many(
241   "src_vers",
242   "Debbugs::DB::Result::SrcVer",
243   { "foreign.based_on" => "self.id" },
244   { cascade_copy => 0, cascade_delete => 0 },
245 );
246
247
248 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2012-11-25 00:09:07
249 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1YjejvJjXTE1Q6OjD5x9zg
250
251
252 # You can replace this text with custom code or comments, and it will be preserved on regeneration
253 1;