<?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 Version20230716185050 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 cms_sections (id INT AUTO_INCREMENT NOT NULL, cms_id_id INT NOT NULL, section_name VARCHAR(255) DEFAULT NULL, section_slug VARCHAR(255) DEFAULT NULL, backend_template VARCHAR(255) DEFAULT NULL, frontend_template VARCHAR(255) DEFAULT NULL, position INT DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', deleted_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_41788F655137057B (cms_id_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE cms_sections ADD CONSTRAINT FK_41788F655137057B FOREIGN KEY (cms_id_id) REFERENCES cms_pages (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cms_sections DROP FOREIGN KEY FK_41788F655137057B');
$this->addSql('DROP TABLE cms_sections');
}
}