<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20220905134935 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->skipIf(
true
===
$schema->getTable('member_application')->hasIndex('idx_member_application_processing_status'),
'The processing_status index was already added to the member_application table!'
);
$schema->getTable('member_application')->addIndex(
['processing_status'],
'idx_member_application_processing_status'
);
}
public function down(Schema $schema): void
{
$this->skipIf(
false
===
$schema->getTable('member_application')->hasIndex('idx_member_application_processing_status'),
'The processing_status index was already removed from the member_application table!'
);
$schema->getTable('member_application')->dropIndex(
'idx_member_application_processing_status'
);
}
}