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