<?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 Version20220503100629 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 media__media CHANGE provider_metadata provider_metadata JSON DEFAULT NULL');
$this->addSql('ALTER TABLE page ADD flip_card_collection_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB6207248EF16 FOREIGN KEY (flip_card_collection_id) REFERENCES flip_card_collection (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_140AB6207248EF16 ON page (flip_card_collection_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE media__media CHANGE provider_metadata provider_metadata JSON DEFAULT NULL');
$this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB6207248EF16');
$this->addSql('DROP INDEX UNIQ_140AB6207248EF16 ON page');
$this->addSql('ALTER TABLE page DROP flip_card_collection_id');
}
}