PMCORE-3634 Upgrade to 3.7.3-5664 is changing some tables of the workspace and causing errors

This commit is contained in:
Roly Gutierrez
2022-01-20 00:14:44 -04:00
committed by Paula Quispe
parent 9fbe88037e
commit f353771163
2 changed files with 17 additions and 7 deletions

View File

@@ -832,6 +832,16 @@ class WorkspaceTools
$description = $database->executeQuery($database->generateDescTableSQL($table));
$oldSchema[$table] = [];
foreach ($description as $field) {
$type = $field['Type'];
if ($type === "int") {
$field['Type'] = $type . "(11)";
}
if ($type === "tinyint") {
$field['Type'] = $type . "(4)";
}
if ($type === "bigint") {
$field['Type'] = $type . "(20)";
}
$oldSchema[$table][$field['Field']]['Field'] = $field['Field'];
$oldSchema[$table][$field['Field']]['Type'] = $field['Type'];
$oldSchema[$table][$field['Field']]['Null'] = $field['Null'];