| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | final class Version20181020065148 extends AbstractMigration |
||
| 15 | { |
||
| 16 | private const CAMEL_CASE_COLUMNS = [ |
||
| 17 | 'countryCode', |
||
| 18 | 'countryName', |
||
| 19 | 'regionName', |
||
| 20 | 'cityName', |
||
| 21 | ]; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @throws SchemaException |
||
| 25 | */ |
||
| 26 | public function up(Schema $schema): void |
||
| 27 | { |
||
| 28 | $visitLocations = $schema->getTable('visit_locations'); |
||
| 29 | |||
| 30 | foreach (self::CAMEL_CASE_COLUMNS as $name) { |
||
| 31 | if ($visitLocations->hasColumn($name)) { |
||
| 32 | $visitLocations->dropColumn($name); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | public function down(Schema $schema): void |
||
| 39 | // No down |
||
| 40 | } |
||
| 42 |