<?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 Version20211123135558 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_textarea');
INSERT 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
('form_maxlength', @block_id, '1', '1', 'Max length', 'INPUT', '1', now(), now(), '3', NULL);
");
}
public function down(Schema $schema) : void
{
$this->addSql("
SET @block_id=(SELECT id FROM std_blocks WHERE machine_name='form_textarea');
DELETE FROM `std_blocks_settings` where machine_name IN ('form_maxlength') and `block_id`= @block_id;
");
}
}