mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 15:05:45 +00:00
BUG: BUG Fix PostgreSQL error when creating a table for namespaced data object
This issue is caused by the presence of backslash characters (PHP namespace delimiter) in entity names.
This commit is contained in:
parent
0ffaf3d055
commit
fe85c32d5b
@ -947,7 +947,7 @@ class PostgreSQLDatabase extends SS_Database {
|
||||
|
||||
if(!$asDbValue){
|
||||
|
||||
$tableCol= 'ix_' . $tableName . '_' . $indexName;
|
||||
$tableCol= 'ix_' . str_replace("\\", "_", $tableName) . '_' . $indexName;
|
||||
if(strlen($tableCol)>64){
|
||||
$tableCol=substr($indexName, 0, 59) . rand(1000, 9999);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user