<?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 Version20220901092808 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 incident ADD deportation_location_origin_id INT DEFAULT NULL, ADD deportation_location_destination_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE incident ADD CONSTRAINT FK_3D03A11A4677553A FOREIGN KEY (deportation_location_origin_id) REFERENCES place (id)');
$this->addSql('ALTER TABLE incident ADD CONSTRAINT FK_3D03A11A2C1D1D5 FOREIGN KEY (deportation_location_destination_id) REFERENCES place (id)');
$this->addSql('CREATE INDEX IDX_3D03A11A4677553A ON incident (deportation_location_origin_id)');
$this->addSql('CREATE INDEX IDX_3D03A11A2C1D1D5 ON incident (deportation_location_destination_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE incident DROP FOREIGN KEY FK_3D03A11A4677553A');
$this->addSql('ALTER TABLE incident DROP FOREIGN KEY FK_3D03A11A2C1D1D5');
$this->addSql('DROP INDEX IDX_3D03A11A4677553A ON incident');
$this->addSql('DROP INDEX IDX_3D03A11A2C1D1D5 ON incident');
$this->addSql('ALTER TABLE incident DROP deportation_location_origin_id, DROP deportation_location_destination_id');
}
}