<?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 Version20230818121415 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 email_tracking (id INT AUTO_INCREMENT NOT NULL, money_log_id INT NOT NULL, details VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, update_at DATETIME NOT NULL, sent_at DATETIME DEFAULT NULL, INDEX IDX_A31A7D55EAF9D69F (money_log_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE email_tracking ADD CONSTRAINT FK_A31A7D55EAF9D69F FOREIGN KEY (money_log_id) REFERENCES money_log (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE email_tracking DROP FOREIGN KEY FK_A31A7D55EAF9D69F');
$this->addSql('DROP TABLE email_tracking');
}
}