mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 03:28:18 +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) {
|
foreach ($object->fields as $key => $val) {
|
||||||
$i++;
|
$i++;
|
||||||
if (!empty($val['index'])) {
|
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";
|
$texttoinsert .= "\n";
|
||||||
}
|
}
|
||||||
if (!empty($val['foreignkey'])) {
|
if (!empty($val['foreignkey'])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user