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