migrations/Version20210409124248.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.  * DATEPICKER webpackEntry
  8.  */
  9. final class Version20210409124248 extends AbstractMigration
  10. {
  11.     public function getDescription() : string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema) : void
  16.     {
  17.         $this->addSql("
  18.         SET @id_block = (select id from `std_blocks` WHERE machine_name = 'form_date');
  19.             UPDATE `std_blocks` SET `settings`='{\"webpackEntries\": [\"daterangepicker\"]}' WHERE  `id`=@id_block;
  20.         ");
  21.     }
  22.     public function down(Schema $schema) : void
  23.     {
  24.         $this->addSql("
  25.         SET @id_block = (select id from `std_blocks` WHERE machine_name = 'form_date');
  26.             UPDATE `std_blocks` SET `settings`=NULL WHERE  `id`=@id_block;
  27.         ");
  28.     }
  29. }