]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BugVer.pm
Add id to bug_ver and some more indices
[debbugs.git] / Debbugs / DB / Result / BugVer.pm
1 use utf8;
2 package Debbugs::DB::Result::BugVer;
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::BugVer - Bug versions
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_ver>
31
32 =cut
33
34 __PACKAGE__->table("bug_ver");
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_ver_id_seq'
44
45 Bug version id
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 ver_string
56
57   data_type: 'text'
58   is_nullable: 1
59
60 Version string
61
62 =head2 src_pkg
63
64   data_type: 'integer'
65   is_foreign_key: 1
66   is_nullable: 1
67
68 Source package id (matches src_pkg table)
69
70 =head2 src_ver
71
72   data_type: 'integer'
73   is_foreign_key: 1
74   is_nullable: 1
75
76 Source package version id (matches src_ver table)
77
78 =head2 found
79
80   data_type: 'boolean'
81   default_value: true
82   is_nullable: 0
83
84 True if this is a found version; false if this is a fixed version
85
86 =head2 creation
87
88   data_type: 'timestamp with time zone'
89   default_value: current_timestamp
90   is_nullable: 0
91   original: {default_value => \"now()"}
92
93 Time that this entry was created
94
95 =head2 last_modified
96
97   data_type: 'timestamp with time zone'
98   default_value: current_timestamp
99   is_nullable: 0
100   original: {default_value => \"now()"}
101
102 Time that this entry was modified
103
104 =cut
105
106 __PACKAGE__->add_columns(
107   "id",
108   {
109     data_type         => "integer",
110     is_auto_increment => 1,
111     is_nullable       => 0,
112     sequence          => "bug_ver_id_seq",
113   },
114   "bug",
115   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
116   "ver_string",
117   { data_type => "text", is_nullable => 1 },
118   "src_pkg",
119   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
120   "src_ver",
121   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
122   "found",
123   { data_type => "boolean", default_value => \"true", is_nullable => 0 },
124   "creation",
125   {
126     data_type     => "timestamp with time zone",
127     default_value => \"current_timestamp",
128     is_nullable   => 0,
129     original      => { default_value => \"now()" },
130   },
131   "last_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 );
139
140 =head1 PRIMARY KEY
141
142 =over 4
143
144 =item * L</id>
145
146 =back
147
148 =cut
149
150 __PACKAGE__->set_primary_key("id");
151
152 =head1 UNIQUE CONSTRAINTS
153
154 =head2 C<bug_ver_bug_ver_string_found_idx>
155
156 =over 4
157
158 =item * L</bug>
159
160 =item * L</ver_string>
161
162 =item * L</found>
163
164 =back
165
166 =cut
167
168 __PACKAGE__->add_unique_constraint(
169   "bug_ver_bug_ver_string_found_idx",
170   ["bug", "ver_string", "found"],
171 );
172
173 =head1 RELATIONS
174
175 =head2 bug
176
177 Type: belongs_to
178
179 Related object: L<Debbugs::DB::Result::Bug>
180
181 =cut
182
183 __PACKAGE__->belongs_to(
184   "bug",
185   "Debbugs::DB::Result::Bug",
186   { id => "bug" },
187   { is_deferrable => 0, on_delete => "RESTRICT", on_update => "CASCADE" },
188 );
189
190 =head2 src_pkg
191
192 Type: belongs_to
193
194 Related object: L<Debbugs::DB::Result::SrcPkg>
195
196 =cut
197
198 __PACKAGE__->belongs_to(
199   "src_pkg",
200   "Debbugs::DB::Result::SrcPkg",
201   { id => "src_pkg" },
202   {
203     is_deferrable => 0,
204     join_type     => "LEFT",
205     on_delete     => "SET NULL",
206     on_update     => "CASCADE",
207   },
208 );
209
210 =head2 src_ver
211
212 Type: belongs_to
213
214 Related object: L<Debbugs::DB::Result::SrcVer>
215
216 =cut
217
218 __PACKAGE__->belongs_to(
219   "src_ver",
220   "Debbugs::DB::Result::SrcVer",
221   { id => "src_ver" },
222   {
223     is_deferrable => 0,
224     join_type     => "LEFT",
225     on_delete     => "SET NULL",
226     on_update     => "CASCADE",
227   },
228 );
229
230
231 # Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-23 17:31:18
232 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yTXx9otJq7Ur+tbswRs8mQ
233
234
235 # You can replace this text with custom code or comments, and it will be preserved on regeneration
236 1;