mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
FIX handling of fulltext indexes declared as strings
This commit is contained in:
parent
4f6a9523f6
commit
d112ca5d12
@ -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