Bugfix: Module builder missing table prefix
The function rebuildObjectSql from the module builder module is missing the table prefix when adding a constraint
This commit is contained in:
parent
2ca5a4378b
commit
39afe39016
@ -321,7 +321,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '
|
||||
$tmp = explode('.', $val['foreignkey']);
|
||||
if (!empty($tmp[0]) && !empty($tmp[1]))
|
||||
{
|
||||
$texttoinsert .= "ALTER TABLE llx_".strtolower($module).'_'.strtolower($objectname)." ADD CONSTRAINT llx_".strtolower($module).'_'.strtolower($objectname)."_".$key." FOREIGN KEY (".$key.") REFERENCES ".$tmp[0]."(".$tmp[1].");";
|
||||
$texttoinsert .= "ALTER TABLE llx_".strtolower($module).'_'.strtolower($objectname)." ADD CONSTRAINT llx_".strtolower($module).'_'.strtolower($objectname)."_".$key." FOREIGN KEY (".$key.") REFERENCES ".MAIN_DB_PREFIX.$tmp[0]."(".$tmp[1].");";
|
||||
$texttoinsert .= "\n";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user