<?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 Version20210903120618 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 hf_app_user_death_notice (app_user_id INT NOT NULL, death_notice_id INT NOT NULL, INDEX IDX_51B960974A3353D8 (app_user_id), INDEX IDX_51B96097A01285CE (death_notice_id), PRIMARY KEY(app_user_id, death_notice_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE hf_app_user_death_notice ADD CONSTRAINT FK_51B960974A3353D8 FOREIGN KEY (app_user_id) REFERENCES eckinox_app_users (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE hf_app_user_death_notice ADD CONSTRAINT FK_51B96097A01285CE FOREIGN KEY (death_notice_id) REFERENCES hf_death_notice (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE hf_app_user_death_notice');
}
}