<?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 Version20210820143726 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
$this->addSql("
SET @id_block = (select id from `std_blocks` WHERE machine_name = 'B06_image_text');
INSERT INTO `std_blocks_components` (`machine_name`, `block_id`, `created_by`, `updated_by`, `component_type`, `settings`, `order_value`, `is_active`, `created_date`, `updated_date`, `name`, `is_repeatable`) VALUES
('image_width', @id_block, 1, 1, 'COMBO', '{\"data\": [{\"100%\": \"12\"}, {\"75%\": \"9\"}, {\"66%\": \"8\"}, {\"50%\": \"6\"}, {\"33%\": \"4\"}, {\"25%\": \"3\"}], \"type\": \"static\", \"default\": \"9\"}', 5, 1, now(), now(), 'Image width', 1);
");
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql("
SET @id_block = (select id from `std_blocks` WHERE machine_name = 'B06_image_text');
DELETE FROM `std_blocks_components` WHERE machine_name='image_width' and block_id=@id_block;
");
}
}