<?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 Version20220331090113 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('CREATE TABLE quote_item (id INT AUTO_INCREMENT NOT NULL, quote_id INT NOT NULL, page_id INT NOT NULL, INDEX IDX_8DFC7A94DB805178 (quote_id), INDEX IDX_8DFC7A94C4663E4 (page_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE quote_item ADD CONSTRAINT FK_8DFC7A94DB805178 FOREIGN KEY (quote_id) REFERENCES quote (id)');
$this->addSql('ALTER TABLE quote_item ADD CONSTRAINT FK_8DFC7A94C4663E4 FOREIGN KEY (page_id) REFERENCES page (id)');
$this->addSql('ALTER TABLE media__media CHANGE provider_metadata provider_metadata JSON DEFAULT NULL');
$this->addSql('ALTER TABLE obstacle_collection ADD disposition VARCHAR(20) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE quote_item');
$this->addSql('ALTER TABLE media__media CHANGE provider_metadata provider_metadata JSON DEFAULT NULL');
$this->addSql('ALTER TABLE obstacle_collection DROP disposition');
}
}