<?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 Version20230713085524 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 depot_dossier ADD controler1_id INT DEFAULT NULL, ADD controler2_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE depot_dossier ADD CONSTRAINT FK_2E6CACA68ABF4AC2 FOREIGN KEY (controler1_id) REFERENCES equipe (id)');
$this->addSql('ALTER TABLE depot_dossier ADD CONSTRAINT FK_2E6CACA6980AE52C FOREIGN KEY (controler2_id) REFERENCES equipe (id)');
$this->addSql('CREATE INDEX IDX_2E6CACA68ABF4AC2 ON depot_dossier (controler1_id)');
$this->addSql('CREATE INDEX IDX_2E6CACA6980AE52C ON depot_dossier (controler2_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE depot_dossier DROP FOREIGN KEY FK_2E6CACA68ABF4AC2');
$this->addSql('ALTER TABLE depot_dossier DROP FOREIGN KEY FK_2E6CACA6980AE52C');
$this->addSql('DROP INDEX IDX_2E6CACA68ABF4AC2 ON depot_dossier');
$this->addSql('DROP INDEX IDX_2E6CACA6980AE52C ON depot_dossier');
$this->addSql('ALTER TABLE depot_dossier DROP controler1_id, DROP controler2_id');
}
}