]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BugStatusCache.pm
update to new schema which includes many_to_many relationships
[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 bug
41
42   data_type: 'integer'
43   is_foreign_key: 1
44   is_nullable: 0
45
46 Bug number (matches bug)
47
48 =head2 suite
49
50   data_type: 'integer'
51   is_foreign_key: 1
52   is_nullable: 1
53
54 Suite id (matches suite)
55
56 =head2 arch
57
58   data_type: 'integer'
59   is_foreign_key: 1
60   is_nullable: 1
61
62 Architecture id (matches arch)
63
64 =head2 status
65
66   data_type: 'enum'
67   extra: {custom_type_name => "bug_status_type",list => ["pending","forwarded","pending-fixed","fixed","absent","done"]}
68   is_nullable: 0
69
70 Status (bug status)
71
72 =head2 modified
73
74   data_type: 'timestamp with time zone'
75   default_value: current_timestamp
76   is_nullable: 0
77   original: {default_value => \"now()"}
78
79 Time that this status was last modified
80
81 =head2 asof
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 calculated
89
90 =cut
91
92 __PACKAGE__->add_columns(
93   "bug",
94   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
95   "suite",
96   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97   "arch",
98   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
99   "status",
100   {
101     data_type => "enum",
102     extra => {
103       custom_type_name => "bug_status_type",
104       list => [
105         "pending",
106         "forwarded",
107         "pending-fixed",
108         "fixed",
109         "absent",
110         "done",
111       ],
112     },
113     is_nullable => 0,
114   },
115   "modified",
116   {
117     data_type     => "timestamp with time zone",
118     default_value => \"current_timestamp",
119     is_nullable   => 0,
120     original      => { default_value => \"now()" },
121   },
122   "asof",
123   {
124     data_type     => "timestamp with time zone",
125     default_value => \"current_timestamp",
126     is_nullable   => 0,
127     original      => { default_value => \"now()" },
128   },
129 );
130
131 =head1 UNIQUE CONSTRAINTS
132
133 =head2 C<bug_status_cache_bug_suite_arch_idx>
134
135 =over 4
136
137 =item * L</bug>
138
139 =item * L</suite>
140
141 =item * L</arch>
142
143 =back
144
145 =cut
146
147 __PACKAGE__->add_unique_constraint(
148   "bug_status_cache_bug_suite_arch_idx",
149   ["bug", "suite", "arch"],
150 );
151
152 =head1 RELATIONS
153
154 =head2 arch
155
156 Type: belongs_to
157
158 Related object: L<Debbugs::DB::Result::Arch>
159
160 =cut
161
162 __PACKAGE__->belongs_to(
163   "arch",
164   "Debbugs::DB::Result::Arch",
165   { id => "arch" },
166   {
167     is_deferrable => 0,
168     join_type     => "LEFT",
169     on_delete     => "CASCADE",
170     on_update     => "CASCADE",
171   },
172 );
173
174 =head2 bug
175
176 Type: belongs_to
177
178 Related object: L<Debbugs::DB::Result::Bug>
179
180 =cut
181
182 __PACKAGE__->belongs_to(
183   "bug",
184   "Debbugs::DB::Result::Bug",
185   { id => "bug" },
186   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
187 );
188
189 =head2 suite
190
191 Type: belongs_to
192
193 Related object: L<Debbugs::DB::Result::Suite>
194
195 =cut
196
197 __PACKAGE__->belongs_to(
198   "suite",
199   "Debbugs::DB::Result::Suite",
200   { id => "suite" },
201   {
202     is_deferrable => 0,
203     join_type     => "LEFT",
204     on_delete     => "CASCADE",
205     on_update     => "CASCADE",
206   },
207 );
208
209
210 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
211 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dgaCogdpUWo99BQhdH68Mg
212
213
214 # You can replace this text with custom code or comments, and it will be preserved on regeneration
215 1;