<?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 Version20200925144306 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 pmc_dvfs (pmc_id INT NOT NULL, dvf_id INT NOT NULL, PRIMARY KEY(pmc_id, dvf_id))');
$this->addSql('CREATE INDEX IDX_9A3DE236BD15B51 ON pmc_dvfs (pmc_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_9A3DE23D3784D7D ON pmc_dvfs (dvf_id)');
$this->addSql('ALTER TABLE pmc_dvfs ADD CONSTRAINT FK_9A3DE236BD15B51 FOREIGN KEY (pmc_id) REFERENCES pmc (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE pmc_dvfs ADD CONSTRAINT FK_9A3DE23D3784D7D FOREIGN KEY (dvf_id) REFERENCES dvf (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('DROP TABLE pmc_dvfs');
}
}