<?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 Version20210806141132 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 configuration_disposition_code DROP FOREIGN KEY FK_EEA89E9C289ABF4A');
$this->addSql('ALTER TABLE configuration_disposition_code DROP FOREIGN KEY FK_EEA89E9C73F32DD8');
$this->addSql('ALTER TABLE configuration_disposition_code ADD CONSTRAINT FK_EEA89E9C289ABF4A FOREIGN KEY (disposition_code_id) REFERENCES disposition_code (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE configuration_disposition_code ADD CONSTRAINT FK_EEA89E9C73F32DD8 FOREIGN KEY (configuration_id) REFERENCES configuration (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE configuration_pleading_code DROP FOREIGN KEY FK_2F65025A2E5C11B3');
$this->addSql('ALTER TABLE configuration_pleading_code DROP FOREIGN KEY FK_2F65025A73F32DD8');
$this->addSql('ALTER TABLE configuration_pleading_code ADD CONSTRAINT FK_2F65025A2E5C11B3 FOREIGN KEY (pleading_code_id) REFERENCES pleading_code (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE configuration_pleading_code ADD CONSTRAINT FK_2F65025A73F32DD8 FOREIGN KEY (configuration_id) REFERENCES configuration (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE configuration_calendar_code DROP FOREIGN KEY FK_61D92BD145AD85D0');
$this->addSql('ALTER TABLE configuration_calendar_code DROP FOREIGN KEY FK_61D92BD173F32DD8');
$this->addSql('ALTER TABLE configuration_calendar_code ADD CONSTRAINT FK_61D92BD145AD85D0 FOREIGN KEY (calendar_code_id) REFERENCES calendar_code (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE configuration_calendar_code ADD CONSTRAINT FK_61D92BD173F32DD8 FOREIGN KEY (configuration_id) REFERENCES configuration (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE configuration_report_code DROP FOREIGN KEY FK_6FAEBF1B47438317');
$this->addSql('ALTER TABLE configuration_report_code DROP FOREIGN KEY FK_6FAEBF1B73F32DD8');
$this->addSql('ALTER TABLE configuration_report_code ADD CONSTRAINT FK_6FAEBF1B47438317 FOREIGN KEY (report_code_id) REFERENCES report_code (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE configuration_report_code ADD CONSTRAINT FK_6FAEBF1B73F32DD8 FOREIGN KEY (configuration_id) REFERENCES configuration (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 chambervote DROP FOREIGN KEY FK_DC210F2E9FAF8308');
$this->addSql('ALTER TABLE chambervote DROP FOREIGN KEY FK_DC210F2E72DCDAFC');
$this->addSql('ALTER TABLE configuration_calendar_code DROP FOREIGN KEY FK_61D92BD173F32DD8');
$this->addSql('ALTER TABLE configuration_calendar_code DROP FOREIGN KEY FK_61D92BD145AD85D0');
$this->addSql('ALTER TABLE configuration_calendar_code ADD CONSTRAINT FK_61D92BD173F32DD8 FOREIGN KEY (configuration_id) REFERENCES configuration (id)');
$this->addSql('ALTER TABLE configuration_calendar_code ADD CONSTRAINT FK_61D92BD145AD85D0 FOREIGN KEY (calendar_code_id) REFERENCES calendar_code (id)');
$this->addSql('ALTER TABLE configuration_disposition_code DROP FOREIGN KEY FK_EEA89E9C73F32DD8');
$this->addSql('ALTER TABLE configuration_disposition_code DROP FOREIGN KEY FK_EEA89E9C289ABF4A');
$this->addSql('ALTER TABLE configuration_disposition_code ADD CONSTRAINT FK_EEA89E9C73F32DD8 FOREIGN KEY (configuration_id) REFERENCES configuration (id)');
$this->addSql('ALTER TABLE configuration_disposition_code ADD CONSTRAINT FK_EEA89E9C289ABF4A FOREIGN KEY (disposition_code_id) REFERENCES disposition_code (id)');
$this->addSql('ALTER TABLE configuration_pleading_code DROP FOREIGN KEY FK_2F65025A73F32DD8');
$this->addSql('ALTER TABLE configuration_pleading_code DROP FOREIGN KEY FK_2F65025A2E5C11B3');
$this->addSql('ALTER TABLE configuration_pleading_code ADD CONSTRAINT FK_2F65025A73F32DD8 FOREIGN KEY (configuration_id) REFERENCES configuration (id)');
$this->addSql('ALTER TABLE configuration_pleading_code ADD CONSTRAINT FK_2F65025A2E5C11B3 FOREIGN KEY (pleading_code_id) REFERENCES pleading_code (id)');
$this->addSql('ALTER TABLE configuration_report_code DROP FOREIGN KEY FK_6FAEBF1B73F32DD8');
$this->addSql('ALTER TABLE configuration_report_code DROP FOREIGN KEY FK_6FAEBF1B47438317');
$this->addSql('ALTER TABLE configuration_report_code ADD CONSTRAINT FK_6FAEBF1B73F32DD8 FOREIGN KEY (configuration_id) REFERENCES configuration (id)');
$this->addSql('ALTER TABLE configuration_report_code ADD CONSTRAINT FK_6FAEBF1B47438317 FOREIGN KEY (report_code_id) REFERENCES report_code (id)');
$this->addSql('ALTER TABLE desiderata_desideratachamber DROP FOREIGN KEY FK_E944A53CCEE5FDB');
$this->addSql('ALTER TABLE desiderata_desideratachamber DROP FOREIGN KEY FK_E944A53C9FAF8308');
$this->addSql('ALTER TABLE desideratachamber DROP FOREIGN KEY FK_365B36D1CEE5FDB');
$this->addSql('ALTER TABLE vote DROP FOREIGN KEY FK_5A10856499601F51');
$this->addSql('ALTER TABLE vote DROP FOREIGN KEY FK_5A108564CEE5FDB');
$this->addSql('ALTER TABLE vote_chambervote DROP FOREIGN KEY FK_6FAC397A72DCDAFC');
$this->addSql('ALTER TABLE vote_chambervote DROP FOREIGN KEY FK_6FAC397A9F63A297');
}
}