<?php
declare(strict_types=1);
namespace ApiCmsBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221206232045 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE api_cms_bundle__mapping (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', context_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', bluue_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', cms_id VARCHAR(64) NOT NULL, cms_name VARCHAR(255) NOT NULL, entity_name VARCHAR(255) NOT NULL, cms_entity_name VARCHAR(255) DEFAULT NULL, INDEX bluue_id (bluue_id), INDEX cms_id (cms_id), INDEX cms_name (cms_name), INDEX entity_name (entity_name), INDEX cms_entity_name (cms_entity_name), INDEX context (context_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE api_cms_bundle__mapping ADD CONSTRAINT FK_1B0F67186B00C1CF FOREIGN KEY (context_id) REFERENCES context (id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE api_cms_bundle__mapping DROP FOREIGN KEY FK_1B0F67186B00C1CF');
$this->addSql('DROP TABLE api_cms_bundle__mapping');
}
}