| @@ 100-117 (lines=18) @@ | ||
| 97 | * |
|
| 98 | * @return array |
|
| 99 | */ |
|
| 100 | public function alteredColumns() |
|
| 101 | { |
|
| 102 | $difference = []; |
|
| 103 | ||
| 104 | $initialColumns = $this->initial->getColumns(); |
|
| 105 | foreach ($this->current->getColumns() as $name => $column) { |
|
| 106 | if (!$this->initial->knowsColumn($name)) { |
|
| 107 | //Added into schema |
|
| 108 | continue; |
|
| 109 | } |
|
| 110 | ||
| 111 | if (!$column->compare($initialColumns[$name])) { |
|
| 112 | $difference[] = [$column, $initialColumns[$name]]; |
|
| 113 | } |
|
| 114 | } |
|
| 115 | ||
| 116 | return $difference; |
|
| 117 | } |
|
| 118 | ||
| 119 | /** |
|
| 120 | * @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 object |
|