<?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 Version20200602113458 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 @id_block = (SELECT id FROM std_blocks WHERE machine_name='form_date');
INSERT INTO `std_blocks_components` (`machine_name`, `block_id`, `created_by`, `updated_by`, `component_type`, `order_value`, `created_date`, `updated_date`, `name`)
VALUES ('form_date_is_range', @id_block, '1', '1', 'CHECKBOX', '1', '2020-05-27 18:06:39', '2020-05-27 18:06:40', 'form_date_is_range');
INSERT INTO `std_blocks_components` (`machine_name`, `block_id`, `created_by`, `updated_by`, `component_type`, `order_value`, `created_date`, `updated_date`, `name`)
VALUES ('form_date_has_time', @id_block, '1', '1', 'CHECKBOX', '1', '2020-05-27 18:06:39', '2020-05-27 18:06:40', 'form_date_has_time');
");
}
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='form_date');
DELETE FROM std_blocks_components where block_id = @id_block and machine_name in ('form_date_is_range','form_date_has_time');
");
}
}