<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20220706165233 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE address DROP FOREIGN KEY FK_D4E6F81EB37EBA0');
$this->addSql('DROP INDEX IDX_D4E6F81EB37EBA0 ON address');
$this->addSql('ALTER TABLE address DROP visiting_card_id');
$this->addSql('ALTER TABLE pictogram DROP FOREIGN KEY FK_56E0A15FEB37EBA0');
$this->addSql('DROP INDEX IDX_56E0A15FEB37EBA0 ON pictogram');
$this->addSql('ALTER TABLE pictogram DROP visiting_card_id');
$this->addSql('ALTER TABLE tag DROP FOREIGN KEY FK_389B783EB37EBA0');
$this->addSql('DROP INDEX IDX_389B783EB37EBA0 ON tag');
$this->addSql('ALTER TABLE tag DROP visiting_card_id');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE address ADD visiting_card_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE address ADD CONSTRAINT FK_D4E6F81EB37EBA0 FOREIGN KEY (visiting_card_id) REFERENCES visiting_card (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('CREATE INDEX IDX_D4E6F81EB37EBA0 ON address (visiting_card_id)');
$this->addSql('ALTER TABLE pictogram ADD visiting_card_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE pictogram ADD CONSTRAINT FK_56E0A15FEB37EBA0 FOREIGN KEY (visiting_card_id) REFERENCES visiting_card (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('CREATE INDEX IDX_56E0A15FEB37EBA0 ON pictogram (visiting_card_id)');
$this->addSql('ALTER TABLE tag ADD visiting_card_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE tag ADD CONSTRAINT FK_389B783EB37EBA0 FOREIGN KEY (visiting_card_id) REFERENCES visiting_card (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('CREATE INDEX IDX_389B783EB37EBA0 ON tag (visiting_card_id)');
}
}