]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 350237: checksetup does not properly add a short_desc index to old installations
authormkanat%bugzilla.org <>
Sat, 26 Aug 2006 06:20:34 +0000 (06:20 +0000)
committermkanat%bugzilla.org <>
Sat, 26 Aug 2006 06:20:34 +0000 (06:20 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=myk

Bugzilla/Install/DB.pm

index 06c46e1ecf52f48cc115b24351866e2fbd606825..adf5b7c302ca4a892ac9979078435bed0a4f4a9c 100644 (file)
@@ -480,7 +480,7 @@ sub update_table_definitions {
     $dbh->bz_alter_column('tokens', 'userid', {TYPE => 'INT3'});
 
     my $sd_index = $dbh->bz_index_info('bugs', 'bugs_short_desc_idx');
-    if ($sd_index && $sd_index->{TYPE} eq 'FULLTEXT') {
+    if (!$sd_index || ($sd_index->{TYPE}  && $sd_index->{TYPE} eq 'FULLTEXT')) {
         $dbh->bz_drop_index('bugs', 'bugs_short_desc_idx');
         $dbh->bz_add_index('bugs', 'bugs_short_desc_idx', [qw(short_desc)]);
     }