<?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 Version20230828210412 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 post DROP FOREIGN KEY FK_5A8A6C8D7FB78667');
$this->addSql('DROP INDEX IDX_5A8A6C8D7FB78667 ON post');
$this->addSql('ALTER TABLE post CHANGE pillar_post_id blog_home_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE post ADD CONSTRAINT FK_5A8A6C8DC43B751F FOREIGN KEY (blog_home_id) REFERENCES blog_home (id)');
$this->addSql('CREATE INDEX IDX_5A8A6C8DC43B751F ON post (blog_home_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE post DROP FOREIGN KEY FK_5A8A6C8DC43B751F');
$this->addSql('DROP INDEX IDX_5A8A6C8DC43B751F ON post');
$this->addSql('ALTER TABLE post CHANGE blog_home_id pillar_post_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE post ADD CONSTRAINT FK_5A8A6C8D7FB78667 FOREIGN KEY (pillar_post_id) REFERENCES blog_home (id)');
$this->addSql('CREATE INDEX IDX_5A8A6C8D7FB78667 ON post (pillar_post_id)');
}
}