connection->getDatabasePlatform() instanceof MySQLPlatform) { $this->write('This migration only apply to MySQL'); return; } foreach ($this->fields as $field) { $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;'); } } public function down(Schema $schema): void { if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) { $this->write('This migration only apply to MySQL'); return; } foreach ($this->fields as $field) { $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;'); } } }