+ // If a column that already exists on logging table is being added, we
+ // should treat it as a modification.
+ $this->resetSchemaCacheForTable("log_$table");
+ $logTableSchema = $this->columnSpecsOf("log_$table");
+ foreach ($cols['ADD'] as $colKey => $col) {
+ if (array_key_exists($col, $logTableSchema)) {
+ $cols['MODIFY'][] = $col;
+ unset($cols['ADD'][$colKey]);
+ }
+ }
+