<?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 Version20250714152059 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 event ADD is_from_stats TINYINT(1) DEFAULT 0 NOT NULL AFTER active');
$this->addSql('ALTER TABLE invoice ADD event_id INT DEFAULT NULL AFTER workshop_id');
$this->addSql('ALTER TABLE invoice ADD CONSTRAINT FK_9065174471F7E88B FOREIGN KEY (event_id) REFERENCES event (id)');
$this->addSql('CREATE INDEX IDX_9065174471F7E88B ON invoice (event_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE event DROP is_from_stats');
$this->addSql('ALTER TABLE invoice DROP FOREIGN KEY FK_9065174471F7E88B');
$this->addSql('DROP INDEX IDX_9065174471F7E88B ON invoice');
$this->addSql('ALTER TABLE invoice DROP event_id');
}
}