getTable('visit_locations'); $this->skipIf(none( self::COLUMNS, fn (string $oldColName) => $visitLocations->hasColumn($oldColName), ), 'Old columns do not exist'); foreach (self::COLUMNS as $colName) { $visitLocations->dropColumn($colName); } } /** * @throws Exception */ public function down(Schema $schema): void { $visitLocations = $schema->getTable('visit_locations'); foreach (self::COLUMNS as $colName) { $visitLocations->addColumn($colName, Types::STRING, [ 'notnull' => false, ]); } } /** * @fixme Workaround for https://github.com/doctrine/migrations/issues/1104 */ public function isTransactional(): bool { return false; } }