@@ 101-118 (lines=18) @@ | ||
98 | * |
|
99 | * @return array |
|
100 | */ |
|
101 | public function alteredColumns() |
|
102 | { |
|
103 | $difference = []; |
|
104 | ||
105 | $initialColumns = $this->initial->getColumns(); |
|
106 | foreach ($this->current->getColumns() as $name => $column) { |
|
107 | if (!$this->initial->knowsColumn($name)) { |
|
108 | //Added into schema |
|
109 | continue; |
|
110 | } |
|
111 | ||
112 | if (!$column->compare($initialColumns[$name])) { |
|
113 | $difference[] = [$column, $initialColumns[$name]]; |
|
114 | } |
|
115 | } |
|
116 | ||
117 | return $difference; |
|
118 | } |
|
119 | ||
120 | /** |
|
121 | * @return AbstractIndex[] |
|
@@ 155-172 (lines=18) @@ | ||
152 | * |
|
153 | * @return array |
|
154 | */ |
|
155 | public function alteredIndexes() |
|
156 | { |
|
157 | $difference = []; |
|
158 | ||
159 | $initialIndexes = $this->initial->getIndexes(); |
|
160 | foreach ($this->current->getIndexes() as $name => $index) { |
|
161 | if (!$this->initial->knowsIndex($name)) { |
|
162 | //Added into schema |
|
163 | continue; |
|
164 | } |
|
165 | ||
166 | if (!$index->compare($initialIndexes[$name])) { |
|
167 | $difference[] = [$index, $initialIndexes[$name]]; |
|
168 | } |
|
169 | } |
|
170 | ||
171 | return $difference; |
|
172 | } |
|
173 | ||
174 | /** |
|
175 | * @return AbstractReference[] |
|
@@ 209-226 (lines=18) @@ | ||
206 | * |
|
207 | * @return array |
|
208 | */ |
|
209 | public function alteredForeigns() |
|
210 | { |
|
211 | $difference = []; |
|
212 | ||
213 | $initialForeigns = $this->initial->getForeigns(); |
|
214 | foreach ($this->current->getForeigns() as $name => $foreign) { |
|
215 | if (!$this->initial->knowsForeign($name)) { |
|
216 | //Added into schema |
|
217 | continue; |
|
218 | } |
|
219 | ||
220 | if (!$foreign->compare($initialForeigns[$name])) { |
|
221 | $difference[] = [$foreign, $initialForeigns[$name]]; |
|
222 | } |
|
223 | } |
|
224 | ||
225 | return $difference; |
|
226 | } |
|
227 | ||
228 | /** |
|
229 | * @return array |