<?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 Version20211221152003 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 blog_page_block ADD image_fond_id INT DEFAULT NULL, DROP image_fond');
$this->addSql('ALTER TABLE blog_page_block ADD CONSTRAINT FK_35C4A1D12FEF9A8 FOREIGN KEY (image_fond_id) REFERENCES media__media (id)');
$this->addSql('CREATE INDEX IDX_35C4A1D12FEF9A8 ON blog_page_block (image_fond_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE blog_page_block DROP FOREIGN KEY FK_35C4A1D12FEF9A8');
$this->addSql('DROP INDEX IDX_35C4A1D12FEF9A8 ON blog_page_block');
$this->addSql('ALTER TABLE blog_page_block ADD image_fond VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, DROP image_fond_id');
}
}