<?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 Version20220125151551 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 integration__mapping_data_shoper ADD connection_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE integration__mapping_data_shoper ADD CONSTRAINT FK_B0DE0497DD03F01 FOREIGN KEY (connection_id) REFERENCES integration__connection_shoper (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_B0DE0497DD03F01 ON integration__mapping_data_shoper (connection_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE integration__mapping_data_shoper DROP CONSTRAINT FK_B0DE0497DD03F01');
$this->addSql('DROP INDEX IDX_B0DE0497DD03F01');
$this->addSql('ALTER TABLE integration__mapping_data_shoper DROP connection_id');
}
}