<?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 Version20230911150011 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('alter table module_page add meta_keywords TEXT default NULL');
}
public function down(Schema $schema): void
{
$this->addSql("create table module_page_dg_tmp
(
id INTEGER not null
primary key autoincrement,
slug VARCHAR(255) not null,
title VARCHAR(255) not null,
description CLOB not null,
capability_title VARCHAR(255) default NULL,
capability_text CLOB default NULL,
configure_title VARCHAR(255) default NULL,
configure_text CLOB default NULL,
tariffs CLOB not null,
feature_text CLOB default NULL,
feature_image VARCHAR(255) default NULL,
created_at DATETIME default CURRENT_TIMESTAMP not null,
updated_at DATETIME default NULL,
feature_btn_text VARCHAR(255) default NULL,
active BOOLEAN not null,
page_title VARCHAR(255) default '' not null,
meta_description VARCHAR(255) default '' not null,
feature_you_tube VARCHAR(255) default NULL,
pos INTEGER default NULL
)
");
$this->addSql("
insert into module_page_dg_tmp(id, slug, title, description, capability_title, capability_text, configure_title,
configure_text, tariffs, feature_text, feature_image, created_at, updated_at,
feature_btn_text, active, page_title, meta_description, feature_you_tube, pos)
select id, slug, title, description, capability_title, capability_text, configure_title, configure_text,
tariffs, feature_text, feature_image, created_at, updated_at, feature_btn_text, active, page_title,
meta_description, feature_you_tube, pos
from module_page
");
$this->addSql("drop table module_page");
$this->addSql("alter table module_page_dg_tmp rename to module_page");
$this->addSql("create unique index UNIQ_AE36F32C989D9B62 on module_page (slug)");
}
}