File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,9 @@ private function diffColumns(ChangedTable $changedTable)
101101 */
102102 private function addChangedColumn (ChangedTable $ changedTable , Column $ column )
103103 {
104- $ changedTable ->addChangedColumn ($ column );
104+ if (!$ changedTable ->hasNewColumn ($ column ->getName ())) {
105+ $ changedTable ->addChangedColumn ($ column );
106+ }
105107
106108 if (!$ column ->getNextColumn ()) {
107109 return ;
Original file line number Diff line number Diff line change @@ -117,6 +117,20 @@ public function getNewColumns()
117117 public function addNewColumn (Column $ newColumn )
118118 {
119119 $ this ->newColumns [$ newColumn ->getName ()] = $ newColumn ;
120+
121+ if (isset ($ this ->changedColumns [$ newColumn ->getName ()])) {
122+ unset($ this ->changedColumns [$ newColumn ->getName ()]);
123+ }
124+ }
125+
126+ /**
127+ * @param $columnName
128+ *
129+ * @return bool
130+ */
131+ public function hasNewColumn ($ columnName )
132+ {
133+ return isset ($ this ->newColumns [$ columnName ]);
120134 }
121135
122136 /**
You can’t perform that action at this time.
0 commit comments