migrations/Version20200521111605.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20200521111605 extends AbstractMigration
  10. {
  11.     public function up(Schema $schema) : void
  12.     {
  13.         $this->addSql("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 ('form_input_children', (SELECT id FROM std_blocks WHERE machine_name='form_select'), 1, 1, 'INPUT', NULL, 5, 1, '2019-08-21 10:20:41', '2019-08-21 10:20:41', 'input_children', 0);");
  14.         $this->addSql("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 ('form_select_parent_relation', (SELECT id FROM std_blocks WHERE machine_name='form_select'), 1, 1, 'INPUT', NULL, 7, 1, '2019-08-21 10:22:55', '2019-08-21 10:22:56', 'select_parent_relation', 1);");
  15.         $this->addSql("UPDATE `std_blocks_components` SET `order_value`='8' WHERE  `block_id`=(SELECT id FROM std_blocks WHERE machine_name='form_select') AND `machine_name`='form_select_label';");
  16.         $this->addSql("UPDATE `std_blocks_components` SET `order_value`='9' WHERE  `block_id`=(SELECT id FROM std_blocks WHERE machine_name='form_select') AND `machine_name`='form_select_value';");
  17.         $this->addSql("UPDATE `std_blocks_components` SET `order_value`='10' WHERE  `block_id`=(SELECT id FROM std_blocks WHERE machine_name='form_select') AND `machine_name`='form_select_parent_relation';");
  18.     }
  19.     public function down(Schema $schema) : void
  20.     {
  21.         $this->addSql("DELETE FROM `std_blocks_components` WHERE `machine_name` = 'form_select_parent_relation' AND `block_id` = (SELECT id FROM std_blocks WHERE machine_name='form_select') ");
  22.         $this->addSql("DELETE FROM `std_blocks_components` WHERE `machine_name` = 'form_input_children' AND `block_id` = (SELECT id FROM std_blocks WHERE machine_name='form_select') ");
  23.     }
  24. }