Merge pull request #34 from micmania1/fix-handle-fulltext-string-declerations

FIX handling of fulltext indexes declared as strings
This commit is contained in:
Sean Harvey 2014-10-15 09:50:51 +13:00
commit fba93bba72
1 changed files with 12 additions and 0 deletions

View File

@ -482,6 +482,18 @@ class PostgreSQLDatabase extends SS_Database {
$ts_details=$this->fulltext($this_index, $tableName, $name);
$fulltexts.=$ts_details['fulltexts'] . ', ';
$triggers.=$ts_details['triggers'];
} else if(is_string($this_index)) {
preg_match('/^fulltext\ \((.+)\)$/i', $this_index, $matches);
if(count($matches) == 2) {
$index = array(
'type' => 'fulltext',
'name' => $name,
'value' => $matches[1]
);
$ts_details=$this->fulltext($index, $tableName, $name);
$fulltexts.=$ts_details['fulltexts'] . ', ';
$triggers.=$ts_details['triggers'];
}
}
}
}