Merge branch 'noglob' into php8

This commit is contained in:
origami11@yandex.ru 2024-01-09 12:03:17 +03:00
commit 3a2b273adc
9 changed files with 76 additions and 42 deletions

View file

@ -63,8 +63,10 @@ class JsonInstall {
$table_name = $action["table_name"];
if (isset($refs[$table_name])) {
foreach ($refs[$table_name] as $value) {
$action['fields'][$value['column']]['references'] =
$value['refTable']."(".$value['refColumn'].")";
$action['fields'][$value['column']]['references'] = [
"refTable" => $value['refTable'],
'refColumn' => $value['refColumn']
];
}
}

View file

@ -145,7 +145,7 @@ class Manager
$constraint = isset($data['constraint']) ? " ".$data['constraint'] : "";
$references = "";
if (isset($data['references'])) {
$references = " REFERENCES ".$data['references'];
$references = " REFERENCES " . $data['references']['refTable'] . '(' .$data['references']['refColumn'] . ')';
}
if (isset($data["not_null"]) && $data["not_null"]) {
$constraint .=" NOT NULL";