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