migrations/Version20210803101330.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 Version20210803101330 extends AbstractMigration
  10. {
  11.     public function getDescription() : string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema) : void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql("
  19.             SET @block_id=(SELECT id FROM std_blocks WHERE machine_name='login');
  20.             UPDATE `std_blocks` SET `settings`='{\"isCacheable\": false, \"isWebUsersLogin\": true, \"webpackEntries\": [\"login_page\"]}' WHERE  `id`=@block_id;
  21.             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 
  22.             ('separador_styles', @block_id, '1', '1', 'Styles', 'SEPARADOR', '1', now(), now(), '1', NULL),
  23.             ('extra_block_id', @block_id, '1', '1', 'Block ID', 'INPUT', '1', now(), now(), '2', NULL),
  24.             ('extra_class', @block_id, '1', '1', 'Extra Class', 'INPUT', '1', now(), now(), '3', NULL),
  25.             ('separador_spacings', @block_id, '1', '1', 'Spacings', 'SEPARADOR', '1', now(), now(), '4', NULL),
  26.             ('margin', @block_id, '1', '1', 'Margin [0px 0px 0px 0px]', 'INPUT', '1', now(), now(), '5', NULL),
  27.             ('padding', @block_id, '1', '1', 'Padding [0px 0px 0px 0px]', 'INPUT', '1', now(), now(), '6', NULL);
  28.         ");
  29.     }
  30.     public function down(Schema $schema) : void
  31.     {
  32.         // this down() migration is auto-generated, please modify it to your needs
  33.         $this->addSql("
  34.             SET @block_id=(SELECT id FROM std_blocks WHERE machine_name='login');
  35.             UPDATE `std_blocks` SET `settings`='{\"isCacheable\": false, \"isWebUsersLogin\": true}' WHERE  `id`=@block_id;
  36.         ");
  37.     }
  38. }