<?php
declare(strict_types=1);
namespace CoreMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220706113231 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 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 down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE api_cms_bundle__mapping');
}
}