mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Copy code manually code to close #32423 without the syntax error.
This commit is contained in:
@@ -411,7 +411,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '
|
||||
foreach ($object->fields as $key => $val) {
|
||||
$i++;
|
||||
if (!empty($val['index'])) {
|
||||
$texttoinsert .= "ALTER TABLE llx_".strtolower($module).'_'.strtolower($objectname)." ADD INDEX idx_".strtolower($module).'_'.strtolower($objectname)."_".$key." (".$key.");";
|
||||
$texttoinsert .= "ALTER TABLE llx_".strtolower($module).'_'.strtolower($objectname)." ADD ".($key == 'ref' ? "UNIQUE INDEX uk_" : "INDEX idx_").strtolower($module).'_'.strtolower($objectname)."_".$key." (".$key.($key == 'ref' && array_key_exists('entity', $object->fields) ? ", entity" : "").");";
|
||||
$texttoinsert .= "\n";
|
||||
}
|
||||
if (!empty($val['foreignkey'])) {
|
||||
|
||||
Reference in New Issue
Block a user