<?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 Version20220214151500 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_id = (SELECT id FROM std_content_types WHERE machine_name='pages_categories' LIMIT 1);");
$this->addSql("INSERT INTO `std_content_types_skins` (`content_type_id`, `machine_name`, `name`, `is_active`, `created_by`, `created_date`, `updated_by`, `updated_date`) VALUES (@content_type_id, 'pages_list_60_40', 'Page List 60% 40%', 1, 1, NOW(), 1, NOW());");
$this->addSql("
SET @block_id=(SELECT id FROM std_blocks WHERE machine_name='block_list');
INSERT IGNORE INTO `std_blocks_settings` (`machine_name`, `block_id`, `created_by`, `updated_by`, `name`, `setting_type`, `is_active`, `created_date`, `updated_date`, `order_value`, `settings`)
VALUES
('fullwidth', @block_id, 1, 1, 'Full Width', 'CHECKBOX', 1, now(), now(), 1, NULL);
");
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addsql("SET @content_type_id = (SELECT id FROM std_content_types WHERE machine_name='pages_categories' LIMIT 1);");
$this->addSql("DELETE FROM `std_content_types_skins` WHERE `content_type_id` = @content_type_id AND `machine_name` = 'pages_list_60_40';");
$this->addSql("SET @block_id=(SELECT id FROM std_blocks WHERE machine_name='block_list');");
$this->addSql("DELETE FROM std_blocks_settings WHERE `machine_name` = 'fullwidth' AND `block_id` = @block_id;");
}
}