<?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 Version20220827085844 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 flag ADD small_image_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE flag ADD CONSTRAINT FK_D1F4EB9AD9E4E1BC FOREIGN KEY (small_image_id) REFERENCES small_image (id)');
$this->addSql('CREATE INDEX IDX_D1F4EB9AD9E4E1BC ON flag (small_image_id)');
$this->addSql('ALTER TABLE pictogram ADD small_image_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE pictogram ADD CONSTRAINT FK_56E0A15FD9E4E1BC FOREIGN KEY (small_image_id) REFERENCES small_image (id)');
$this->addSql('CREATE INDEX IDX_56E0A15FD9E4E1BC ON pictogram (small_image_id)');
$this->addSql('ALTER TABLE tag ADD small_image_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE tag ADD CONSTRAINT FK_389B783D9E4E1BC FOREIGN KEY (small_image_id) REFERENCES small_image (id)');
$this->addSql('CREATE INDEX IDX_389B783D9E4E1BC ON tag (small_image_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE flag DROP FOREIGN KEY FK_D1F4EB9AD9E4E1BC');
$this->addSql('DROP INDEX IDX_D1F4EB9AD9E4E1BC ON flag');
$this->addSql('ALTER TABLE flag DROP small_image_id');
$this->addSql('ALTER TABLE pictogram DROP FOREIGN KEY FK_56E0A15FD9E4E1BC');
$this->addSql('DROP INDEX IDX_56E0A15FD9E4E1BC ON pictogram');
$this->addSql('ALTER TABLE pictogram DROP small_image_id');
$this->addSql('ALTER TABLE tag DROP FOREIGN KEY FK_389B783D9E4E1BC');
$this->addSql('DROP INDEX IDX_389B783D9E4E1BC ON tag');
$this->addSql('ALTER TABLE tag DROP small_image_id');
}
}