<?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 Version20211213213030 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 wedding DROP FOREIGN KEY FK_5BC25C96217BBB47');
$this->addSql('ALTER TABLE wedding ADD CONSTRAINT FK_5BC25C96217BBB47 FOREIGN KEY (person_id) REFERENCES person (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE spouse DROP FOREIGN KEY FK_CD13CC0FB0C855CA');
$this->addSql('ALTER TABLE spouse ADD CONSTRAINT FK_CD13CC0FB0C855CA FOREIGN KEY (graveyard_id) REFERENCES graveyard (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 wedding DROP FOREIGN KEY FK_5BC25C96217BBB47');
$this->addSql('ALTER TABLE wedding ADD CONSTRAINT FK_5BC25C96217BBB47 FOREIGN KEY (person_id) REFERENCES person (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE spouse DROP FOREIGN KEY FK_CD13CC0FB0C855CA');
$this->addSql('ALTER TABLE spouse ADD CONSTRAINT FK_CD13CC0FB0C855CA FOREIGN KEY (graveyard_id) REFERENCES graveyard (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
}
}