Skip to content

Commit

Permalink
add field
Browse files Browse the repository at this point in the history
  • Loading branch information
zyimm committed Nov 26, 2020
1 parent e1ffdad commit 64f6c79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builder/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ public function basicDiff()
foreach ($dev_columns as $table => $columns) {
foreach ($columns as $field => $sql) {
//add
if (!isset($local_columns[$table][$field])) {
if (!in_array($table, $result['ADD_TABLE']) && !isset($local_columns[$table][$field])) {
$result['ADD_FIELD'][$table][$field] = $sql;
//modify
} elseif ($local_columns[$table][$field] !== $sql) {
} elseif (isset($local_columns[$table][$field]) && $local_columns[$table][$field] !== $sql) {
$result['MODIFY_FIELD'][$table][$field] = $sql;
unset($local_columns[$table][$field]);
} else {
Expand Down

0 comments on commit 64f6c79

Please sign in to comment.