| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function changeSchema(Schema $schema, array $options) { |
||
| 32 | $prefix = $options['tablePrefix']; |
||
| 33 | $table = $schema->getTable("{$prefix}accounts"); |
||
| 34 | |||
| 35 | // in beta versions a constraint was added, remove it if it exists |
||
| 36 | foreach ($table->getIndexes() as $index) { |
||
| 37 | if ($index->spansColumns(['email'])) { |
||
| 38 | $table->dropIndex($index->getName()); |
||
| 39 | break; |
||
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 |