Skip to content

Commit bf30645

Browse files
committed
fix: incorrect refactoring
1 parent e14ca8b commit bf30645

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

system/Database/OCI8/Forge.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,11 @@ protected function _alterTable(string $alterType, string $table, $processedField
106106
$sql = 'ALTER TABLE ' . $this->db->escapeIdentifiers($table);
107107

108108
if ($alterType === 'DROP') {
109+
$columnNamesToDrop = $processedFields;
110+
109111
$fields = array_map(
110-
fn ($field) => $this->db->escapeIdentifiers(trim($processedFields)),
111-
is_string($processedFields) ? explode(',', $processedFields) : $processedFields
112+
fn ($field) => $this->db->escapeIdentifiers(trim($field)),
113+
is_string($columnNamesToDrop) ? explode(',', $columnNamesToDrop) : $columnNamesToDrop
112114
);
113115

114116
return $sql . ' DROP (' . implode(',', $fields) . ') CASCADE CONSTRAINT INVALIDATE';

0 commit comments

Comments
 (0)