mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
Merge pull request #34 from micmania1/fix-handle-fulltext-string-declerations
FIX handling of fulltext indexes declared as strings
This commit is contained in:
commit
fba93bba72
@ -482,6 +482,18 @@ class PostgreSQLDatabase extends SS_Database {
|
|||||||
$ts_details=$this->fulltext($this_index, $tableName, $name);
|
$ts_details=$this->fulltext($this_index, $tableName, $name);
|
||||||
$fulltexts.=$ts_details['fulltexts'] . ', ';
|
$fulltexts.=$ts_details['fulltexts'] . ', ';
|
||||||
$triggers.=$ts_details['triggers'];
|
$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'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user