<?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 Version20260323122814 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('CREATE TABLE event_dispatch_log (id INT AUTO_INCREMENT NOT NULL, domain_id INT NOT NULL, tracker_id INT DEFAULT NULL, event_name VARCHAR(100) NOT NULL, provider_name VARCHAR(50) NOT NULL, sent_at DATETIME(6) NOT NULL, INDEX IDX_BB82755E115F0EE5 (domain_id), INDEX IDX_BB82755EFB5230B (tracker_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE event_dispatch_log ADD CONSTRAINT FK_BB82755E115F0EE5 FOREIGN KEY (domain_id) REFERENCES domain (id)');
$this->addSql('ALTER TABLE event_dispatch_log ADD CONSTRAINT FK_BB82755EFB5230B FOREIGN KEY (tracker_id) REFERENCES tracker (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE event_dispatch_log');
}
}