<?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 Version20211019185406 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 hf_death_notice DROP FOREIGN KEY FK_B660FAF343474211');
$this->addSql('ALTER TABLE hf_death_notice DROP FOREIGN KEY FK_B660FAF3555CE105');
$this->addSql('ALTER TABLE hf_death_notice DROP FOREIGN KEY FK_B660FAF3C1538FD4');
$this->addSql('ALTER TABLE hf_death_notice ADD CONSTRAINT FK_B660FAF343474211 FOREIGN KEY (funeral_group_id) REFERENCES hf_funeral_group (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE hf_death_notice ADD CONSTRAINT FK_B660FAF3555CE105 FOREIGN KEY (commemoration_place_id) REFERENCES hf_commemoration_place (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE hf_death_notice ADD CONSTRAINT FK_B660FAF3C1538FD4 FOREIGN KEY (church_id) REFERENCES hf_church (id) ON DELETE SET NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE hf_death_notice DROP FOREIGN KEY FK_B660FAF343474211');
$this->addSql('ALTER TABLE hf_death_notice DROP FOREIGN KEY FK_B660FAF3555CE105');
$this->addSql('ALTER TABLE hf_death_notice DROP FOREIGN KEY FK_B660FAF3C1538FD4');
$this->addSql('ALTER TABLE hf_death_notice ADD CONSTRAINT FK_B660FAF343474211 FOREIGN KEY (funeral_group_id) REFERENCES hf_funeral_group (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE hf_death_notice ADD CONSTRAINT FK_B660FAF3555CE105 FOREIGN KEY (commemoration_place_id) REFERENCES hf_commemoration_place (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE hf_death_notice ADD CONSTRAINT FK_B660FAF3C1538FD4 FOREIGN KEY (church_id) REFERENCES hf_church (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
}
}