<?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 Version20240802065534 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE reminder ADD ticket_id INT DEFAULT NULL, ADD taxation_id INT DEFAULT NULL, ADD subtype INT NOT NULL');
$this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F40700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket (id)');
$this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F402224E81F FOREIGN KEY (taxation_id) REFERENCES taxation (id)');
$this->addSql('CREATE INDEX IDX_40374F40700047D2 ON reminder (ticket_id)');
$this->addSql('CREATE INDEX IDX_40374F402224E81F ON reminder (taxation_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F40700047D2');
$this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F402224E81F');
$this->addSql('DROP INDEX IDX_40374F40700047D2 ON reminder');
$this->addSql('DROP INDEX IDX_40374F402224E81F ON reminder');
$this->addSql('ALTER TABLE reminder DROP ticket_id, DROP taxation_id, DROP subtype');
}
}