29 lines
846 B
PHP
29 lines
846 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
final class Version20260417120000 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return 'Add department column to specialist_dcode_description';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE specialist_dcode_description ADD department BIGINT DEFAULT NULL');
|
|
$this->addSql('CREATE INDEX idx_specialist_dcode_description_department ON specialist_dcode_description (department)');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql('DROP INDEX idx_specialist_dcode_description_department');
|
|
$this->addSql('ALTER TABLE specialist_dcode_description DROP department');
|
|
}
|
|
}
|