2 package Debbugs::DB::Result::BugVer;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Debbugs::DB::Result::BugVer - Bug versions
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<bug_ver>
36 __PACKAGE__->table("bug_ver");
45 sequence: 'bug_ver_id_seq'
70 Source package id (matches src_pkg table)
78 Source package version id (matches src_ver table)
86 True if this is a found version; false if this is a fixed version
90 data_type: 'timestamp with time zone'
91 default_value: current_timestamp
93 original: {default_value => \"now()"}
95 Time that this entry was created
99 data_type: 'timestamp with time zone'
100 default_value: current_timestamp
102 original: {default_value => \"now()"}
104 Time that this entry was modified
108 __PACKAGE__->add_columns(
111 data_type => "integer",
112 is_auto_increment => 1,
114 sequence => "bug_ver_id_seq",
117 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
119 { data_type => "text", is_nullable => 1 },
121 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
123 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
125 { data_type => "boolean", default_value => \"true", is_nullable => 0 },
128 data_type => "timestamp with time zone",
129 default_value => \"current_timestamp",
131 original => { default_value => \"now()" },
135 data_type => "timestamp with time zone",
136 default_value => \"current_timestamp",
138 original => { default_value => \"now()" },
152 __PACKAGE__->set_primary_key("id");
154 =head1 UNIQUE CONSTRAINTS
156 =head2 C<bug_ver_bug_ver_string_found_idx>
162 =item * L</ver_string>
170 __PACKAGE__->add_unique_constraint(
171 "bug_ver_bug_ver_string_found_idx",
172 ["bug", "ver_string", "found"],
181 Related object: L<Debbugs::DB::Result::Bug>
185 __PACKAGE__->belongs_to(
187 "Debbugs::DB::Result::Bug",
189 { is_deferrable => 0, on_delete => "RESTRICT", on_update => "CASCADE" },
196 Related object: L<Debbugs::DB::Result::SrcPkg>
200 __PACKAGE__->belongs_to(
202 "Debbugs::DB::Result::SrcPkg",
207 on_delete => "SET NULL",
208 on_update => "CASCADE",
216 Related object: L<Debbugs::DB::Result::SrcVer>
220 __PACKAGE__->belongs_to(
222 "Debbugs::DB::Result::SrcVer",
227 on_delete => "SET NULL",
228 on_update => "CASCADE",
233 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51
234 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cvdjFL2o+rBg2PfcintuNA
237 sub sqlt_deploy_hook {
238 my ($self, $sqlt_table) = @_;
239 for my $idx (qw(src_pkg src_ver)) {
240 $sqlt_table->add_index(name => 'bug_ver_'.$idx.'_id_idx',
243 $sqlt_table->add_index(name => 'bug_ver_src_pkg_id_src_ver_id_idx',
244 fields => [qw(src_pkg src_ver)],