src/Migrations/Version20181222141821.php
<?php declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20181222141821 extends AbstractMigration
{
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE user CHANGE last_name lastname VARCHAR(100) NOT NULL, CHANGE phone_number phonenumber VARCHAR(35) NOT NULL COMMENT \'(DC2Type:phone_number)\', CHANGE postal_code postalcode VARCHAR(10) NOT NULL');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE user CHANGE lastname last_name VARCHAR(100) NOT NULL COLLATE utf8mb4_unicode_ci, CHANGE postalcode postal_code VARCHAR(10) NOT NULL COLLATE utf8mb4_unicode_ci, CHANGE phonenumber phone_number VARCHAR(35) NOT NULL COLLATE utf8mb4_unicode_ci COMMENT \'(DC2Type:phone_number)\'');
}
}