|
@@ 88-92 (lines=5) @@
|
| 85 |
|
$arrayDiff = array_values($arrayDiff); |
| 86 |
|
$sqlDrop = "ALTER TABLE $tabela \n"; |
| 87 |
|
for ($j = 0; $j < count($arrayDiff); $j++) { |
| 88 |
|
if ($j != count($arrayDiff) - 1) { |
| 89 |
|
$sqlDrop .= "DROP " . $arrayDiff[$j] . ", "; |
| 90 |
|
} else { |
| 91 |
|
$sqlDrop .= "DROP " . $arrayDiff[$j] . ";"; |
| 92 |
|
} |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
$contentFile = JsonReader::read(BASE_DIR."/phiber_config.json")->phiber->code_sync == 1 ? true : false; |
|
@@ 173-177 (lines=5) @@
|
| 170 |
|
|
| 171 |
|
$stringSql = $stringAlterTable; |
| 172 |
|
for ($j = 0; $j < count($arrayDiff); $j++) { |
| 173 |
|
if ($j != count($arrayDiff) - 1) { |
| 174 |
|
$stringSql .= "ADD " . $arrayDiff[$j]; |
| 175 |
|
} else { |
| 176 |
|
$stringSql .= "ADD " . $arrayDiff[$j]; |
| 177 |
|
} |
| 178 |
|
if (array_key_exists('type', $arrFormatado)) { |
| 179 |
|
|
| 180 |
|
$stringSql .= " " . $arrFormatado['type'] . ""; |