migrations/Version20220110161759.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 Version20220110161759 extends AbstractMigration
  10. {
  11.     public function getDescription() : string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema) : void
  16.     {
  17.         $this->addSql("
  18.         UPDATE `std_config` SET `label`='Scripts Header' WHERE  `machine_name`='scripts_header' AND `language_code`='pt';
  19.         UPDATE `std_config` SET `label`='Scripts Header' WHERE  `machine_name`='scripts_header' AND `language_code`='en';
  20.         UPDATE `std_config` SET `label`='Scripts Body' WHERE  `machine_name`='scripts_body' AND `language_code`='pt';
  21.         UPDATE `std_config` SET `label`='Scripts Body' WHERE  `machine_name`='scripts_body' AND `language_code`='en';
  22.         UPDATE `std_config` SET `label`='Scripts Footer' WHERE  `machine_name`='scripts_footer' AND `language_code`='pt';
  23.         UPDATE `std_config` SET `label`='Scripts Footer' WHERE  `machine_name`='scripts_footer' AND `language_code`='en';
  24.         ");
  25.         $this->addSql("
  26.         SET @block_id=(SELECT id FROM std_blocks WHERE machine_name='B06_image_text'); 
  27.         UPDATE `std_blocks_skins` SET `machine_name`='columns_3', `name`='3 columns' WHERE  `block_id`=@block_id AND `machine_name`='text_image50';
  28.         ");
  29.         $this->addSql("
  30.         SET @block_id=(SELECT id FROM std_blocks WHERE machine_name='B01_slideshow'); 
  31.         INSERT IGNORE INTO `std_blocks_settings` (`machine_name`, `block_id`, `created_by`, `updated_by`, `name`, `setting_type`, `is_active`, `created_date`, `updated_date`, `order_value`, `settings`)
  32.         VALUES
  33.         ('carousel_dots', @block_id, 1, 1, 'Dots', 'CHECKBOX', 1, now(), now(), 1, NULL),
  34.         ('carousel_arrows', @block_id, 1, 1, 'Arrows', 'CHECKBOX', 1, now(), now(), 1, NULL);
  35.         ");
  36.         
  37.         $this->addSql("
  38.         DELETE FROM `std_content_types_skins` WHERE  `content_type_id`=5 AND `machine_name`='render_form';
  39.         ");
  40.         
  41.         $this->addSql("
  42.         SET @id_block=(SELECT id FROM std_blocks WHERE machine_name='B02_title');    
  43.             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 
  44.             ('disabled_block', @id_block, 1, 1, 'Disabled block', 'CHECKBOX', 1, now(), now(), -1, NULL);
  45.         SET @id_block=(SELECT id FROM std_blocks WHERE machine_name='B03_text');    
  46.             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 
  47.             ('disabled_block', @id_block, 1, 1, 'Disabled block', 'CHECKBOX', 1, now(), now(), -1, NULL);
  48.         SET @id_block=(SELECT id FROM std_blocks WHERE machine_name='B11_html');    
  49.             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 
  50.             ('disabled_block', @id_block, 1, 1, 'Disabled block', 'CHECKBOX', 1, now(), now(), -1, NULL);
  51.         SET @id_block=(SELECT id FROM std_blocks WHERE machine_name='B06_image_text');    
  52.             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 
  53.             ('disabled_block', @id_block, 1, 1, 'Disabled block', 'CHECKBOX', 1, now(), now(), -1, NULL);
  54.         ");
  55.         
  56.     }
  57.     public function down(Schema $schema) : void
  58.     {
  59.         // this down() migration is auto-generated, please modify it to your needs
  60.     }
  61. }