<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20250522065458 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add checksheet_status_id to dp_schedule_log table';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql(<<<'SQL'
ALTER TABLE dp_schedule_log ADD checksheet_status_id INT DEFAULT NULL
SQL);
$this->addSql(<<<'SQL'
ALTER TABLE dp_schedule_log ADD CONSTRAINT FK_B22799C62D1319DC FOREIGN KEY (checksheet_status_id) REFERENCES tc_tcard_checksheet_status (id)
SQL);
$this->addSql(<<<'SQL'
CREATE INDEX IDX_B22799C62D1319DC ON dp_schedule_log (checksheet_status_id)
SQL);
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql(<<<'SQL'
ALTER TABLE dp_schedule_log DROP FOREIGN KEY FK_B22799C62D1319DC
SQL);
$this->addSql(<<<'SQL'
DROP INDEX IDX_B22799C62D1319DC ON dp_schedule_log
SQL);
$this->addSql(<<<'SQL'
ALTER TABLE dp_schedule_log DROP checksheet_status_id
SQL);
}
}