2 package Debbugs::DB::Result::BinVer;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Debbugs::DB::Result::BinVer - Binary 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<bin_ver>
36 __PACKAGE__->table("bin_ver");
45 sequence: 'bin_ver_id_seq'
55 Binary package id (matches bin_pkg)
63 Source version (matchines src_ver)
71 Architecture id (matches arch)
75 data_type: 'debversion'
82 __PACKAGE__->add_columns(
85 data_type => "integer",
86 is_auto_increment => 1,
88 sequence => "bin_ver_id_seq",
91 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
93 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
95 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
97 { data_type => "debversion", is_nullable => 0 },
110 __PACKAGE__->set_primary_key("id");
112 =head1 UNIQUE CONSTRAINTS
114 =head2 C<bin_ver_bin_pkg_id_arch_idx>
128 __PACKAGE__->add_unique_constraint("bin_ver_bin_pkg_id_arch_idx", ["bin_pkg", "arch", "ver"]);
136 Related object: L<Debbugs::DB::Result::Arch>
140 __PACKAGE__->belongs_to(
142 "Debbugs::DB::Result::Arch",
144 { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
147 =head2 bin_associations
151 Related object: L<Debbugs::DB::Result::BinAssociation>
155 __PACKAGE__->has_many(
157 "Debbugs::DB::Result::BinAssociation",
158 { "foreign.bin" => "self.id" },
159 { cascade_copy => 0, cascade_delete => 0 },
166 Related object: L<Debbugs::DB::Result::BinPkg>
170 __PACKAGE__->belongs_to(
172 "Debbugs::DB::Result::BinPkg",
174 { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
181 Related object: L<Debbugs::DB::Result::SrcVer>
185 __PACKAGE__->belongs_to(
187 "Debbugs::DB::Result::SrcVer",
189 { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
193 # Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-11-24 09:08:27
194 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DzTzZbPkilT8WMhXoZv9xw
197 sub sqlt_deploy_hook {
198 my ($self, $sqlt_table) = @_;
199 for my $idx (qw(var bin_pkg src_ver)) {
200 $sqlt_table->add_index(name => 'bin_ver_'.$idx.'_id_idx',
203 $sqlt_table->add_index(name => 'bin_ver_src_ver_id_arch_idx',
204 fields => [qw(src_ver arch)]