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