Commit 011c5c09 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 350237: checksetup does not properly add a short_desc index to old installations

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=myk
parent e2172f5b
......@@ -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)]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment