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