]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BugVer.pm
update result classes for new relationships
[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 bug
39
40   data_type: 'integer'
41   is_foreign_key: 1
42   is_nullable: 0
43
44 Bug number
45
46 =head2 ver_string
47
48   data_type: 'text'
49   is_nullable: 1
50
51 Version string
52
53 =head2 src_pkg
54
55   data_type: 'integer'
56   is_foreign_key: 1
57   is_nullable: 1
58
59 Source package id (matches src_pkg table)
60
61 =head2 src_ver_id
62
63   data_type: 'integer'
64   is_foreign_key: 1
65   is_nullable: 1
66
67 Source package version id (matches src_ver table)
68
69 =head2 found
70
71   data_type: 'boolean'
72   default_value: true
73   is_nullable: 0
74
75 True if this is a found version; false if this is a fixed version
76
77 =head2 creation
78
79   data_type: 'timestamp with time zone'
80   default_value: current_timestamp
81   is_nullable: 0
82   original: {default_value => \"now()"}
83
84 Time that this entry was created
85
86 =head2 last_modified
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 modified
94
95 =cut
96
97 __PACKAGE__->add_columns(
98   "bug",
99   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
100   "ver_string",
101   { data_type => "text", is_nullable => 1 },
102   "src_pkg",
103   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
104   "src_ver_id",
105   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
106   "found",
107   { data_type => "boolean", default_value => \"true", is_nullable => 0 },
108   "creation",
109   {
110     data_type     => "timestamp with time zone",
111     default_value => \"current_timestamp",
112     is_nullable   => 0,
113     original      => { default_value => \"now()" },
114   },
115   "last_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 );
123
124 =head1 UNIQUE CONSTRAINTS
125
126 =head2 C<bug_ver_bug_ver_string_found_idx>
127
128 =over 4
129
130 =item * L</bug>
131
132 =item * L</ver_string>
133
134 =item * L</found>
135
136 =back
137
138 =cut
139
140 __PACKAGE__->add_unique_constraint(
141   "bug_ver_bug_ver_string_found_idx",
142   ["bug", "ver_string", "found"],
143 );
144
145 =head1 RELATIONS
146
147 =head2 bug
148
149 Type: belongs_to
150
151 Related object: L<Debbugs::DB::Result::Bug>
152
153 =cut
154
155 __PACKAGE__->belongs_to(
156   "bug",
157   "Debbugs::DB::Result::Bug",
158   { id => "bug" },
159   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
160 );
161
162 =head2 src_pkg
163
164 Type: belongs_to
165
166 Related object: L<Debbugs::DB::Result::SrcPkg>
167
168 =cut
169
170 __PACKAGE__->belongs_to(
171   "src_pkg",
172   "Debbugs::DB::Result::SrcPkg",
173   { id => "src_pkg" },
174   {
175     is_deferrable => 1,
176     join_type     => "LEFT",
177     on_delete     => "CASCADE",
178     on_update     => "CASCADE",
179   },
180 );
181
182 =head2 src_ver
183
184 Type: belongs_to
185
186 Related object: L<Debbugs::DB::Result::SrcVer>
187
188 =cut
189
190 __PACKAGE__->belongs_to(
191   "src_ver",
192   "Debbugs::DB::Result::SrcVer",
193   { id => "src_ver_id" },
194   {
195     is_deferrable => 1,
196     join_type     => "LEFT",
197     on_delete     => "CASCADE",
198     on_update     => "CASCADE",
199   },
200 );
201
202
203 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-03-27 18:54:20
204 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/WX1pwdsAUjQK28CwCaDQw
205
206
207 # You can replace this text with custom code or comments, and it will be preserved on regeneration
208 1;