<?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 Version20251001142440 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 merci_facteur_tracking (id INT AUTO_INCREMENT NOT NULL, token_id INT DEFAULT NULL, envoi_id INT NOT NULL, event_date DATETIME NOT NULL, event_type VARCHAR(100) NOT NULL, event_description LONGTEXT NOT NULL, raw_data LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, INDEX IDX_1EDA55BE41DEE7B9 (token_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE merci_facteur_tracking ADD CONSTRAINT FK_1EDA55BE41DEE7B9 FOREIGN KEY (token_id) REFERENCES token (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE merci_facteur_tracking DROP FOREIGN KEY FK_1EDA55BE41DEE7B9');
$this->addSql('DROP TABLE merci_facteur_tracking');
}
}