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