<?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 Version20220216110108 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
$this->addSql("
SET @block_id = (SELECT id FROM std_blocks WHERE machine_name = 'form_text');
DELETE FROM `std_blocks_settings` WHERE `block_id`= @block_id AND `machine_name` = 'offset';
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
('setting_form_cols', @block_id, '1', '1', 'Form cols', 'INPUT', '1', now(), now(), '4', NULL);
");
}
public function down(Schema $schema) : void
{
$this->addSql("
SET @block_id = (SELECT id FROM std_blocks WHERE machine_name = 'form_text');
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
('offset', @block_id, '1', '1', 'Offset', 'CHECKBOX', '1', now(), now(), '4', NULL);
DELETE FROM `std_blocks_settings` WHERE `block_id`= @block_id AND `machine_name` = 'setting_form_cols';
");
}
}