]> git.donarmstrong.com Git - debbugs.git/blob - lib/Debbugs/DB/Result/BugMerged.pm
move Debbugs to lib
[debbugs.git] / lib / Debbugs / DB / Result / BugMerged.pm
1 use utf8;
2 package Debbugs::DB::Result::BugMerged;
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::BugMerged - Bugs which are merged with other 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_merged>
33
34 =cut
35
36 __PACKAGE__->table("bug_merged");
37
38 =head1 ACCESSORS
39
40 =head2 id
41
42   data_type: 'integer'
43   is_auto_increment: 1
44   is_nullable: 0
45   sequence: 'bug_merged_id_seq'
46
47 =head2 bug
48
49   data_type: 'integer'
50   is_foreign_key: 1
51   is_nullable: 0
52
53 Bug number
54
55 =head2 merged
56
57   data_type: 'integer'
58   is_foreign_key: 1
59   is_nullable: 0
60
61 Bug number which is merged with bug
62
63 =cut
64
65 __PACKAGE__->add_columns(
66   "id",
67   {
68     data_type         => "integer",
69     is_auto_increment => 1,
70     is_nullable       => 0,
71     sequence          => "bug_merged_id_seq",
72   },
73   "bug",
74   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
75   "merged",
76   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
77 );
78
79 =head1 PRIMARY KEY
80
81 =over 4
82
83 =item * L</id>
84
85 =back
86
87 =cut
88
89 __PACKAGE__->set_primary_key("id");
90
91 =head1 UNIQUE CONSTRAINTS
92
93 =head2 C<bug_merged_bug_id_merged_idx>
94
95 =over 4
96
97 =item * L</bug>
98
99 =item * L</merged>
100
101 =back
102
103 =cut
104
105 __PACKAGE__->add_unique_constraint("bug_merged_bug_id_merged_idx", ["bug", "merged"]);
106
107 =head1 RELATIONS
108
109 =head2 bug
110
111 Type: belongs_to
112
113 Related object: L<Debbugs::DB::Result::Bug>
114
115 =cut
116
117 __PACKAGE__->belongs_to(
118   "bug",
119   "Debbugs::DB::Result::Bug",
120   { id => "bug" },
121   { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
122 );
123
124 =head2 merged
125
126 Type: belongs_to
127
128 Related object: L<Debbugs::DB::Result::Bug>
129
130 =cut
131
132 __PACKAGE__->belongs_to(
133   "merged",
134   "Debbugs::DB::Result::Bug",
135   { id => "merged" },
136   { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
137 );
138
139
140 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
141 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HdGeCb1Fh2cU08+TTQVi/Q
142
143 sub sqlt_deploy_hook {
144     my ($self, $sqlt_table) = @_;
145     for my $idx (qw(bug merged)) {
146         $sqlt_table->add_index(name => 'bug_merged_'.$idx.'_idx',
147                                fields => [$idx]);
148     }
149 }
150
151 1;