2 package Debbugs::DB::Result::SrcPkg;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Debbugs::DB::Result::SrcPkg - Source packages
16 use base 'DBIx::Class::Core';
18 =head1 COMPONENTS LOADED
22 =item * L<DBIx::Class::InflateColumn::DateTime>
24 =item * L<DBIx::Class::TimeStamp>
30 __PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
32 =head1 TABLE: C<src_pkg>
36 __PACKAGE__->table("src_pkg");
45 sequence: 'src_pkg_id_seq'
68 Source package id which this source package is an alias of
72 data_type: 'timestamp with time zone'
73 default_value: current_timestamp
75 original: {default_value => \"now()"}
79 data_type: 'timestamp with time zone'
80 default_value: infinity
85 data_type: 'timestamp with time zone'
86 default_value: current_timestamp
88 original: {default_value => \"now()"}
98 __PACKAGE__->add_columns(
101 data_type => "integer",
102 is_auto_increment => 1,
104 sequence => "src_pkg_id_seq",
107 { data_type => "text", is_nullable => 0 },
109 { data_type => "boolean", default_value => \"false", is_nullable => 0 },
111 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
114 data_type => "timestamp with time zone",
115 default_value => \"current_timestamp",
117 original => { default_value => \"now()" },
121 data_type => "timestamp with time zone",
122 default_value => "infinity",
127 data_type => "timestamp with time zone",
128 default_value => \"current_timestamp",
130 original => { default_value => \"now()" },
133 { data_type => "boolean", default_value => \"false", is_nullable => 0 },
146 __PACKAGE__->set_primary_key("id");
148 =head1 UNIQUE CONSTRAINTS
150 =head2 C<src_pkg_pkg_disabled>
162 __PACKAGE__->add_unique_constraint("src_pkg_pkg_disabled", ["pkg", "disabled"]);
170 Related object: L<Debbugs::DB::Result::SrcPkg>
174 __PACKAGE__->belongs_to(
176 "Debbugs::DB::Result::SrcPkg",
177 { id => "alias_of" },
181 on_delete => "CASCADE",
182 on_update => "CASCADE",
186 =head2 bug_affects_srcpackages
190 Related object: L<Debbugs::DB::Result::BugAffectsSrcpackage>
194 __PACKAGE__->has_many(
195 "bug_affects_srcpackages",
196 "Debbugs::DB::Result::BugAffectsSrcpackage",
197 { "foreign.src_pkg" => "self.id" },
198 { cascade_copy => 0, cascade_delete => 0 },
201 =head2 bug_srcpackages
205 Related object: L<Debbugs::DB::Result::BugSrcpackage>
209 __PACKAGE__->has_many(
211 "Debbugs::DB::Result::BugSrcpackage",
212 { "foreign.src_pkg" => "self.id" },
213 { cascade_copy => 0, cascade_delete => 0 },
220 Related object: L<Debbugs::DB::Result::BugVer>
224 __PACKAGE__->has_many(
226 "Debbugs::DB::Result::BugVer",
227 { "foreign.src_pkg" => "self.id" },
228 { cascade_copy => 0, cascade_delete => 0 },
235 Related object: L<Debbugs::DB::Result::SrcPkg>
239 __PACKAGE__->has_many(
241 "Debbugs::DB::Result::SrcPkg",
242 { "foreign.alias_of" => "self.id" },
243 { cascade_copy => 0, cascade_delete => 0 },
250 Related object: L<Debbugs::DB::Result::SrcVer>
254 __PACKAGE__->has_many(
256 "Debbugs::DB::Result::SrcVer",
257 { "foreign.src_pkg" => "self.id" },
258 { cascade_copy => 0, cascade_delete => 0 },
262 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
263 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j8LGu4eUfNUNxM/jkHUG2A
266 sub sqlt_deploy_hook {
267 my ($self, $sqlt_table) = @_;
268 $sqlt_table->add_index(name => 'src_pkg_pkg',