]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/Bug.pm
update to new schema which includes many_to_many relationships
[debbugs.git] / Debbugs / DB / Result / Bug.pm
1 use utf8;
2 package Debbugs::DB::Result::Bug;
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::Bug - Bugs
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<bug>
33
34 =cut
35
36 __PACKAGE__->table("bug");
37
38 =head1 ACCESSORS
39
40 =head2 id
41
42   data_type: 'integer'
43   is_nullable: 0
44
45 Bug number
46
47 =head2 creation
48
49   data_type: 'timestamp with time zone'
50   default_value: current_timestamp
51   is_nullable: 0
52   original: {default_value => \"now()"}
53
54 Time bug created
55
56 =head2 log_modified
57
58   data_type: 'timestamp with time zone'
59   default_value: current_timestamp
60   is_nullable: 0
61   original: {default_value => \"now()"}
62
63 Time bug log was last modified
64
65 =head2 last_modified
66
67   data_type: 'timestamp with time zone'
68   default_value: current_timestamp
69   is_nullable: 0
70   original: {default_value => \"now()"}
71
72 Time bug status was last modified
73
74 =head2 archived
75
76   data_type: 'boolean'
77   default_value: false
78   is_nullable: 0
79
80 True if bug has been archived
81
82 =head2 unarchived
83
84   data_type: 'timestamp with time zone'
85   is_nullable: 1
86
87 Time bug was last unarchived; null if bug has never been unarchived
88
89 =head2 forwarded
90
91   data_type: 'text'
92   default_value: (empty string)
93   is_nullable: 0
94
95 Where bug has been forwarded to; empty if it has not been forwarded
96
97 =head2 summary
98
99   data_type: 'text'
100   default_value: (empty string)
101   is_nullable: 0
102
103 Summary of the bug; empty if it has no summary
104
105 =head2 outlook
106
107   data_type: 'text'
108   default_value: (empty string)
109   is_nullable: 0
110
111 Outlook of the bug; empty if it has no outlook
112
113 =head2 subject
114
115   data_type: 'text'
116   is_nullable: 0
117
118 Subject of the bug
119
120 =head2 severity
121
122   data_type: 'integer'
123   is_foreign_key: 1
124   is_nullable: 0
125
126 =head2 done
127
128   data_type: 'integer'
129   is_foreign_key: 1
130   is_nullable: 1
131
132 Individual who did the -done; empty if it has never been -done
133
134 =head2 done_full
135
136   data_type: 'text'
137   default_value: (empty string)
138   is_nullable: 0
139
140 =head2 owner
141
142   data_type: 'integer'
143   is_foreign_key: 1
144   is_nullable: 1
145
146 Individual who owns this bug; empty if no one owns it
147
148 =head2 owner_full
149
150   data_type: 'text'
151   default_value: (empty string)
152   is_nullable: 0
153
154 =head2 submitter
155
156   data_type: 'integer'
157   is_foreign_key: 1
158   is_nullable: 1
159
160 Individual who submitted this bug; empty if there is no submitter
161
162 =head2 submitter_full
163
164   data_type: 'text'
165   default_value: (empty string)
166   is_nullable: 0
167
168 =head2 unknown_packages
169
170   data_type: 'text'
171   default_value: (empty string)
172   is_nullable: 0
173
174 Package name if the package is not known
175
176 =cut
177
178 __PACKAGE__->add_columns(
179   "id",
180   { data_type => "integer", is_nullable => 0 },
181   "creation",
182   {
183     data_type     => "timestamp with time zone",
184     default_value => \"current_timestamp",
185     is_nullable   => 0,
186     original      => { default_value => \"now()" },
187   },
188   "log_modified",
189   {
190     data_type     => "timestamp with time zone",
191     default_value => \"current_timestamp",
192     is_nullable   => 0,
193     original      => { default_value => \"now()" },
194   },
195   "last_modified",
196   {
197     data_type     => "timestamp with time zone",
198     default_value => \"current_timestamp",
199     is_nullable   => 0,
200     original      => { default_value => \"now()" },
201   },
202   "archived",
203   { data_type => "boolean", default_value => \"false", is_nullable => 0 },
204   "unarchived",
205   { data_type => "timestamp with time zone", is_nullable => 1 },
206   "forwarded",
207   { data_type => "text", default_value => "", is_nullable => 0 },
208   "summary",
209   { data_type => "text", default_value => "", is_nullable => 0 },
210   "outlook",
211   { data_type => "text", default_value => "", is_nullable => 0 },
212   "subject",
213   { data_type => "text", is_nullable => 0 },
214   "severity",
215   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
216   "done",
217   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
218   "done_full",
219   { data_type => "text", default_value => "", is_nullable => 0 },
220   "owner",
221   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
222   "owner_full",
223   { data_type => "text", default_value => "", is_nullable => 0 },
224   "submitter",
225   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
226   "submitter_full",
227   { data_type => "text", default_value => "", is_nullable => 0 },
228   "unknown_packages",
229   { data_type => "text", default_value => "", is_nullable => 0 },
230 );
231
232 =head1 PRIMARY KEY
233
234 =over 4
235
236 =item * L</id>
237
238 =back
239
240 =cut
241
242 __PACKAGE__->set_primary_key("id");
243
244 =head1 RELATIONS
245
246 =head2 bug_affects_binpackages
247
248 Type: has_many
249
250 Related object: L<Debbugs::DB::Result::BugAffectsBinpackage>
251
252 =cut
253
254 __PACKAGE__->has_many(
255   "bug_affects_binpackages",
256   "Debbugs::DB::Result::BugAffectsBinpackage",
257   { "foreign.bug" => "self.id" },
258   { cascade_copy => 0, cascade_delete => 0 },
259 );
260
261 =head2 bug_affects_srcpackages
262
263 Type: has_many
264
265 Related object: L<Debbugs::DB::Result::BugAffectsSrcpackage>
266
267 =cut
268
269 __PACKAGE__->has_many(
270   "bug_affects_srcpackages",
271   "Debbugs::DB::Result::BugAffectsSrcpackage",
272   { "foreign.bug" => "self.id" },
273   { cascade_copy => 0, cascade_delete => 0 },
274 );
275
276 =head2 bug_binpackages
277
278 Type: has_many
279
280 Related object: L<Debbugs::DB::Result::BugBinpackage>
281
282 =cut
283
284 __PACKAGE__->has_many(
285   "bug_binpackages",
286   "Debbugs::DB::Result::BugBinpackage",
287   { "foreign.bug" => "self.id" },
288   { cascade_copy => 0, cascade_delete => 0 },
289 );
290
291 =head2 bug_blocks_blocks
292
293 Type: has_many
294
295 Related object: L<Debbugs::DB::Result::BugBlock>
296
297 =cut
298
299 __PACKAGE__->has_many(
300   "bug_blocks_blocks",
301   "Debbugs::DB::Result::BugBlock",
302   { "foreign.blocks" => "self.id" },
303   { cascade_copy => 0, cascade_delete => 0 },
304 );
305
306 =head2 bug_blocks_bugs
307
308 Type: has_many
309
310 Related object: L<Debbugs::DB::Result::BugBlock>
311
312 =cut
313
314 __PACKAGE__->has_many(
315   "bug_blocks_bugs",
316   "Debbugs::DB::Result::BugBlock",
317   { "foreign.bug" => "self.id" },
318   { cascade_copy => 0, cascade_delete => 0 },
319 );
320
321 =head2 bug_merged_bugs
322
323 Type: has_many
324
325 Related object: L<Debbugs::DB::Result::BugMerged>
326
327 =cut
328
329 __PACKAGE__->has_many(
330   "bug_merged_bugs",
331   "Debbugs::DB::Result::BugMerged",
332   { "foreign.bug" => "self.id" },
333   { cascade_copy => 0, cascade_delete => 0 },
334 );
335
336 =head2 bug_mergeds_merged
337
338 Type: has_many
339
340 Related object: L<Debbugs::DB::Result::BugMerged>
341
342 =cut
343
344 __PACKAGE__->has_many(
345   "bug_mergeds_merged",
346   "Debbugs::DB::Result::BugMerged",
347   { "foreign.merged" => "self.id" },
348   { cascade_copy => 0, cascade_delete => 0 },
349 );
350
351 =head2 bug_messages
352
353 Type: has_many
354
355 Related object: L<Debbugs::DB::Result::BugMessage>
356
357 =cut
358
359 __PACKAGE__->has_many(
360   "bug_messages",
361   "Debbugs::DB::Result::BugMessage",
362   { "foreign.bug" => "self.id" },
363   { cascade_copy => 0, cascade_delete => 0 },
364 );
365
366 =head2 bug_srcpackages
367
368 Type: has_many
369
370 Related object: L<Debbugs::DB::Result::BugSrcpackage>
371
372 =cut
373
374 __PACKAGE__->has_many(
375   "bug_srcpackages",
376   "Debbugs::DB::Result::BugSrcpackage",
377   { "foreign.bug" => "self.id" },
378   { cascade_copy => 0, cascade_delete => 0 },
379 );
380
381 =head2 bug_status_caches
382
383 Type: has_many
384
385 Related object: L<Debbugs::DB::Result::BugStatusCache>
386
387 =cut
388
389 __PACKAGE__->has_many(
390   "bug_status_caches",
391   "Debbugs::DB::Result::BugStatusCache",
392   { "foreign.bug" => "self.id" },
393   { cascade_copy => 0, cascade_delete => 0 },
394 );
395
396 =head2 bug_tags
397
398 Type: has_many
399
400 Related object: L<Debbugs::DB::Result::BugTag>
401
402 =cut
403
404 __PACKAGE__->has_many(
405   "bug_tags",
406   "Debbugs::DB::Result::BugTag",
407   { "foreign.bug" => "self.id" },
408   { cascade_copy => 0, cascade_delete => 0 },
409 );
410
411 =head2 bug_user_tags
412
413 Type: has_many
414
415 Related object: L<Debbugs::DB::Result::BugUserTag>
416
417 =cut
418
419 __PACKAGE__->has_many(
420   "bug_user_tags",
421   "Debbugs::DB::Result::BugUserTag",
422   { "foreign.bug" => "self.id" },
423   { cascade_copy => 0, cascade_delete => 0 },
424 );
425
426 =head2 bug_vers
427
428 Type: has_many
429
430 Related object: L<Debbugs::DB::Result::BugVer>
431
432 =cut
433
434 __PACKAGE__->has_many(
435   "bug_vers",
436   "Debbugs::DB::Result::BugVer",
437   { "foreign.bug" => "self.id" },
438   { cascade_copy => 0, cascade_delete => 0 },
439 );
440
441 =head2 done
442
443 Type: belongs_to
444
445 Related object: L<Debbugs::DB::Result::Correspondent>
446
447 =cut
448
449 __PACKAGE__->belongs_to(
450   "done",
451   "Debbugs::DB::Result::Correspondent",
452   { id => "done" },
453   {
454     is_deferrable => 0,
455     join_type     => "LEFT",
456     on_delete     => "NO ACTION",
457     on_update     => "NO ACTION",
458   },
459 );
460
461 =head2 owner
462
463 Type: belongs_to
464
465 Related object: L<Debbugs::DB::Result::Correspondent>
466
467 =cut
468
469 __PACKAGE__->belongs_to(
470   "owner",
471   "Debbugs::DB::Result::Correspondent",
472   { id => "owner" },
473   {
474     is_deferrable => 0,
475     join_type     => "LEFT",
476     on_delete     => "NO ACTION",
477     on_update     => "NO ACTION",
478   },
479 );
480
481 =head2 severity
482
483 Type: belongs_to
484
485 Related object: L<Debbugs::DB::Result::Severity>
486
487 =cut
488
489 __PACKAGE__->belongs_to(
490   "severity",
491   "Debbugs::DB::Result::Severity",
492   { id => "severity" },
493   { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
494 );
495
496 =head2 submitter
497
498 Type: belongs_to
499
500 Related object: L<Debbugs::DB::Result::Correspondent>
501
502 =cut
503
504 __PACKAGE__->belongs_to(
505   "submitter",
506   "Debbugs::DB::Result::Correspondent",
507   { id => "submitter" },
508   {
509     is_deferrable => 0,
510     join_type     => "LEFT",
511     on_delete     => "NO ACTION",
512     on_update     => "NO ACTION",
513   },
514 );
515
516
517 # Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-09-24 14:51:07
518 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iaipVETTaokcFNrICfIEAw
519
520 __PACKAGE__->many_to_many(tags => 'bug_tags','tag');
521 __PACKAGE__->many_to_many(user_tags => 'bug_user_tags','user_tag');
522 __PACKAGE__->many_to_many(srcpackages => 'bug_srcpackages','src_pkg');
523 __PACKAGE__->many_to_many(binpackages => 'bug_binpackages','bin_pkg');
524 __PACKAGE__->many_to_many(affects_binpackages => 'bug_affects_binpackages','bin_pkg');
525 __PACKAGE__->many_to_many(affects_srcpackages => 'bug_affects_srcpackages','src_pkg');
526 __PACKAGE__->many_to_many(messages => 'bug_messages','message');
527
528 # You can replace this text with custom code or comments, and it will be preserved on regeneration
529 1;