Files
myep/migrations/Version20260320071724.php
T

29 lines
766 B
PHP

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260320071724 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add error_code column and index to log_entry table';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE log_entry ADD error_code VARCHAR(12) DEFAULT NULL');
$this->addSql('CREATE INDEX IDX_LOG_ENTRY_ERROR_CODE ON log_entry (error_code)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX IDX_LOG_ENTRY_ERROR_CODE ON log_entry');
$this->addSql('ALTER TABLE log_entry DROP error_code');
}
}