<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20261006120000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Код департаменту більше не унікальний';
}
public function up(Schema $schema): void
{
$this->addSql('DROP INDEX UNIQ_99110B5F77153098 ON `list_departments`');
$this->addSql('CREATE INDEX IDX_99110B5F77153098 ON `list_departments` (code)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX IDX_99110B5F77153098 ON `list_departments`');
$this->addSql('CREATE UNIQUE INDEX UNIQ_99110B5F77153098 ON `list_departments` (code)');
}
}