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