<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Types;
use Doctrine\Migrations\AbstractMigration;
final class Version20221007062444 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->skipIf(
true === $schema->getTable('member_application')->hasColumn('company_employee_identifier'),
'The company_employee_identifier field already exists in the member_application table!'
);
$schema->getTable('member_application')->addColumn('company_employee_identifier', Types::STRING)->setNotnull(false);
}
public function down(Schema $schema): void
{
$this->skipIf(
false === $schema->getTable('member_application')->hasColumn('company_employee_identifier'),
'The company_employee_identifier is already removed from the member_application table!'
);
$schema->getTable('member_application')->dropColumn('company_employee_identifier');
}
}