<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Types;
use Doctrine\Migrations\AbstractMigration;
final class Version20220902112722 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->skipIf(
true
===
$schema->getTable('member_application')->hasColumn('processing_status'),
'The processing_status field was already added to the member_application table!'
);
$schema->getTable('member_application')->addColumn('processing_status', Types::STRING, [
'length' => 255,
'notnull' => true,
'default' => 'processing',
]);
}
public function down(Schema $schema): void
{
$this->skipIf(
false
===
$schema->getTable('member_application')->hasColumn('processing_status'),
'The processing_status field was already removed from the member_application table!'
);
$schema->getTable('member_application')->dropColumn('processing_status');
}
}