]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/SrcVer.pm
e9125ba8185d4bcfa409ad544c4b1812f6e01df5
[debbugs.git] / Debbugs / DB / Result / SrcVer.pm
1 use utf8;
2 package Debbugs::DB::Result::SrcVer;
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::SrcVer
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<src_ver>
31
32 =cut
33
34 __PACKAGE__->table("src_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: 'src_ver_id_seq'
44
45 =head2 src_pkg_id
46
47   data_type: 'integer'
48   is_foreign_key: 1
49   is_nullable: 0
50
51 =head2 ver
52
53   data_type: 'text'
54   is_nullable: 0
55
56 =head2 upload_date
57
58   data_type: 'timestamp with time zone'
59   default_value: current_timestamp
60   is_nullable: 0
61   original: {default_value => \"now()"}
62
63 =head2 based_on
64
65   data_type: 'integer'
66   is_foreign_key: 1
67   is_nullable: 1
68
69 =cut
70
71 __PACKAGE__->add_columns(
72   "id",
73   {
74     data_type         => "integer",
75     is_auto_increment => 1,
76     is_nullable       => 0,
77     sequence          => "src_ver_id_seq",
78   },
79   "src_pkg_id",
80   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
81   "ver",
82   { data_type => "text", is_nullable => 0 },
83   "upload_date",
84   {
85     data_type     => "timestamp with time zone",
86     default_value => \"current_timestamp",
87     is_nullable   => 0,
88     original      => { default_value => \"now()" },
89   },
90   "based_on",
91   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
92 );
93
94 =head1 PRIMARY KEY
95
96 =over 4
97
98 =item * L</id>
99
100 =back
101
102 =cut
103
104 __PACKAGE__->set_primary_key("id");
105
106 =head1 UNIQUE CONSTRAINTS
107
108 =head2 C<src_ver_src_pkg_id_ver>
109
110 =over 4
111
112 =item * L</src_pkg_id>
113
114 =item * L</ver>
115
116 =back
117
118 =cut
119
120 __PACKAGE__->add_unique_constraint("src_ver_src_pkg_id_ver", ["src_pkg_id", "ver"]);
121
122 =head1 RELATIONS
123
124 =head2 based_on
125
126 Type: belongs_to
127
128 Related object: L<Debbugs::DB::Result::SrcVer>
129
130 =cut
131
132 __PACKAGE__->belongs_to(
133   "based_on",
134   "Debbugs::DB::Result::SrcVer",
135   { id => "based_on" },
136   {
137     is_deferrable => 1,
138     join_type     => "LEFT",
139     on_delete     => "CASCADE",
140     on_update     => "CASCADE",
141   },
142 );
143
144 =head2 bin_vers
145
146 Type: has_many
147
148 Related object: L<Debbugs::DB::Result::BinVer>
149
150 =cut
151
152 __PACKAGE__->has_many(
153   "bin_vers",
154   "Debbugs::DB::Result::BinVer",
155   { "foreign.src_ver_id" => "self.id" },
156   { cascade_copy => 0, cascade_delete => 0 },
157 );
158
159 =head2 bug_vers
160
161 Type: has_many
162
163 Related object: L<Debbugs::DB::Result::BugVer>
164
165 =cut
166
167 __PACKAGE__->has_many(
168   "bug_vers",
169   "Debbugs::DB::Result::BugVer",
170   { "foreign.src_ver_id" => "self.id" },
171   { cascade_copy => 0, cascade_delete => 0 },
172 );
173
174 =head2 src_pkg
175
176 Type: belongs_to
177
178 Related object: L<Debbugs::DB::Result::SrcPkg>
179
180 =cut
181
182 __PACKAGE__->belongs_to(
183   "src_pkg",
184   "Debbugs::DB::Result::SrcPkg",
185   { id => "src_pkg_id" },
186   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
187 );
188
189 =head2 src_vers
190
191 Type: has_many
192
193 Related object: L<Debbugs::DB::Result::SrcVer>
194
195 =cut
196
197 __PACKAGE__->has_many(
198   "src_vers",
199   "Debbugs::DB::Result::SrcVer",
200   { "foreign.based_on" => "self.id" },
201   { cascade_copy => 0, cascade_delete => 0 },
202 );
203
204
205 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2012-07-17 17:10:22
206 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sYRJ4htIIKwvuvbUemk90A
207
208
209 # You can replace this text with custom code or comments, and it will be preserved on regeneration
210 1;