<?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 Version20220205141600 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 formations ADD cfc_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE formations ADD CONSTRAINT FK_4090213799431A75 FOREIGN KEY (cfc_id) REFERENCES cfc (id)');
$this->addSql('CREATE INDEX IDX_4090213799431A75 ON formations (cfc_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE formations DROP FOREIGN KEY FK_4090213799431A75');
$this->addSql('DROP INDEX IDX_4090213799431A75 ON formations');
$this->addSql('ALTER TABLE formations DROP cfc_id');
}
}