<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Types;
use Doctrine\Migrations\AbstractMigration;
final class Version20221006113830 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->skipIf(
true === $schema->getTable('member_application')->hasColumn('cmcm_status_updated_at'),
'The column cmcm_status_updated_at already exists.'
);
$schema
->getTable('member_application')
->addColumn('cmcm_status_updated_at', Types::DATE_IMMUTABLE)
->setNotnull(false)
->setDefault(null)
;
}
public function down(Schema $schema): void
{
$this->skipIf(
false === $schema->getTable('member_application')->hasColumn('cmcm_status_updated_at'),
'The column cmcm_status_updated_at does not exists.'
);
$schema
->getTable('member_application')
->dropColumn('cmcm_status_updated_at')
;
}
}