]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/DB/Result/BinVer.pm
fix var typo and add in missing correspondent index
[debbugs.git] / Debbugs / DB / Result / BinVer.pm
index df90ebfbe24305a8096ebffe8c212ea0c31b8bee..30be6c2411d7827822b700411ad4be0d4cd3dc64 100644 (file)
@@ -194,5 +194,15 @@ __PACKAGE__->belongs_to(
 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DzTzZbPkilT8WMhXoZv9xw
 
 
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+    my ($self, $sqlt_table) = @_;
+    for my $idx (qw(ver bin_pkg src_ver)) {
+       $sqlt_table->add_index(name => 'bin_ver_'.$idx.'_id_idx',
+                              fields => [$idx]);
+    }
+    $sqlt_table->add_index(name => 'bin_ver_src_ver_id_arch_idx',
+                          fields => [qw(src_ver arch)]
+                         );
+}
+
 1;