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