'at', 'd' => 'de', 'f' => 'fr', 'i' => 'it', ]; public function getDescription(): string { return 'Convert destination.country to lowercase ISO-3166-1 alpha-2'; } public function up(Schema $schema): void { foreach (self::TO_ISO as $legacy => $iso) { $this->addSql('UPDATE destination SET country = ? WHERE country = ?', [$iso, $legacy]); } // ch and nl are already ISO; empty strings were never a country $this->addSql("UPDATE destination SET country = NULL WHERE country = ''"); } public function down(Schema $schema): void { foreach (self::TO_ISO as $legacy => $iso) { $this->addSql('UPDATE destination SET country = ? WHERE country = ?', [$legacy, $iso]); } } }