<?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 Version20220215125049 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("
SET @content_type_id2 = (SELECT id FROM std_content_types WHERE machine_name='pages' LIMIT 1);
INSERT IGNORE INTO `std_content_types_components` (`content_type_id`, `machine_name`, `component_type`, `order_value`, `is_active`, `created_by`, `created_date`, `updated_by`, `updated_date`, `name`, `settings`) VALUES
(@content_type_id2, 'default_image', 'IMAGE', 1, 1, 1, NOW(), 1, NOW(), 'Image', NULL),
(@content_type_id2, 'short_text', 'TEXTAREA', 1, 1, 1, NOW(), 1, NOW(), 'Text', '{\"ckeditor\": \"basic\"}');
");
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql("SET @content_type_id2 = (SELECT id FROM std_content_types WHERE machine_name='pages' LIMIT 1);");
$this->addSql("DELETE FROM `std_content_types_components` WHERE `content_type_id` = @content_type_id2 AND `machine_name` in('default_image','short_text');");
}
}