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