]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BugStatusCache.pm
7aea543926bdb174ceab2e5372896979489b575f
[debbugs.git] / Debbugs / DB / Result / BugStatusCache.pm
1 use utf8;
2 package Debbugs::DB::Result::BugStatusCache;
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::BugStatusCache - Bug Status Cache
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_status_cache>
33
34 =cut
35
36 __PACKAGE__->table("bug_status_cache");
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_status_cache_id_seq'
46
47 Bug status cache entry id
48
49 =head2 bug
50
51   data_type: 'integer'
52   is_foreign_key: 1
53   is_nullable: 0
54
55 Bug number (matches bug)
56
57 =head2 suite
58
59   data_type: 'integer'
60   is_foreign_key: 1
61   is_nullable: 1
62
63 Suite id (matches suite)
64
65 =head2 arch
66
67   data_type: 'integer'
68   is_foreign_key: 1
69   is_nullable: 1
70
71 Architecture id (matches arch)
72
73 =head2 status
74
75   data_type: 'enum'
76   extra: {custom_type_name => "bug_status_type",list => ["pending","forwarded","pending-fixed","fixed","absent","done"]}
77   is_nullable: 0
78
79 Status (bug status)
80
81 =head2 modified
82
83   data_type: 'timestamp with time zone'
84   default_value: current_timestamp
85   is_nullable: 0
86   original: {default_value => \"now()"}
87
88 Time that this status was last modified
89
90 =head2 asof
91
92   data_type: 'timestamp with time zone'
93   default_value: current_timestamp
94   is_nullable: 0
95   original: {default_value => \"now()"}
96
97 Time that this status was last calculated
98
99 =cut
100
101 __PACKAGE__->add_columns(
102   "id",
103   {
104     data_type         => "integer",
105     is_auto_increment => 1,
106     is_nullable       => 0,
107     sequence          => "bug_status_cache_id_seq",
108   },
109   "bug",
110   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
111   "suite",
112   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
113   "arch",
114   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
115   "status",
116   {
117     data_type => "enum",
118     extra => {
119       custom_type_name => "bug_status_type",
120       list => [
121         "pending",
122         "forwarded",
123         "pending-fixed",
124         "fixed",
125         "absent",
126         "done",
127       ],
128     },
129     is_nullable => 0,
130   },
131   "modified",
132   {
133     data_type     => "timestamp with time zone",
134     default_value => \"current_timestamp",
135     is_nullable   => 0,
136     original      => { default_value => \"now()" },
137   },
138   "asof",
139   {
140     data_type     => "timestamp with time zone",
141     default_value => \"current_timestamp",
142     is_nullable   => 0,
143     original      => { default_value => \"now()" },
144   },
145 );
146
147 =head1 PRIMARY KEY
148
149 =over 4
150
151 =item * L</id>
152
153 =back
154
155 =cut
156
157 __PACKAGE__->set_primary_key("id");
158
159 =head1 UNIQUE CONSTRAINTS
160
161 =head2 C<bug_status_cache_bug_suite_arch_idx>
162
163 =over 4
164
165 =item * L</bug>
166
167 =item * L</suite>
168
169 =item * L</arch>
170
171 =back
172
173 =cut
174
175 __PACKAGE__->add_unique_constraint(
176   "bug_status_cache_bug_suite_arch_idx",
177   ["bug", "suite", "arch"],
178 );
179
180 =head1 RELATIONS
181
182 =head2 arch
183
184 Type: belongs_to
185
186 Related object: L<Debbugs::DB::Result::Arch>
187
188 =cut
189
190 __PACKAGE__->belongs_to(
191   "arch",
192   "Debbugs::DB::Result::Arch",
193   { id => "arch" },
194   {
195     is_deferrable => 0,
196     join_type     => "LEFT",
197     on_delete     => "CASCADE",
198     on_update     => "CASCADE",
199   },
200 );
201
202 =head2 bug
203
204 Type: belongs_to
205
206 Related object: L<Debbugs::DB::Result::Bug>
207
208 =cut
209
210 __PACKAGE__->belongs_to(
211   "bug",
212   "Debbugs::DB::Result::Bug",
213   { id => "bug" },
214   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
215 );
216
217 =head2 suite
218
219 Type: belongs_to
220
221 Related object: L<Debbugs::DB::Result::Suite>
222
223 =cut
224
225 __PACKAGE__->belongs_to(
226   "suite",
227   "Debbugs::DB::Result::Suite",
228   { id => "suite" },
229   {
230     is_deferrable => 0,
231     join_type     => "LEFT",
232     on_delete     => "CASCADE",
233     on_update     => "CASCADE",
234   },
235 );
236
237
238 # Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-09-24 14:51:07
239 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jrPFpLs6vLgKWMSLyJAkxA
240
241
242 # You can replace this text with custom code or comments, and it will be preserved on regeneration
243 1;