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