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