<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20221101110717 extends AbstractMigration
{
public function getDescription(): string
{
return 'Make "email" and "last_name" nullable for customers.';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE customer CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE last_name last_name VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE customer CHANGE email email VARCHAR(255) NOT NULL, CHANGE last_name last_name VARCHAR(255) NOT NULL');
}
}