<?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 Version20200804073911 extends AbstractMigration
{
public function up(Schema $schema) : void
{
$this->addSql("INSERT INTO `std_blocks` (`created_by`, `updated_by`, `machine_name`, `is_active`, `created_date`, `updated_date`, `name`, `settings`) VALUES (1, 1, 'block_hotspot', 1, '2019-05-03 10:26:44', '2019-05-03 10:26:44', 'Hotspot', NULL);");
$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 ('hotspot_title', LAST_INSERT_ID(), 1, 1, 'INPUT', NULL, 2, 1, '2019-07-02 14:54:28', '2019-07-02 14:54:29', 'Title', 0);");
$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 ('hotspot_subtitle', LAST_INSERT_ID(), 1, 1, 'INPUT', NULL, 2, 1, '2019-07-02 14:55:18', '2019-07-02 14:55:18', 'Subtitle', 0);");
$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 ('hotspot_btn_link', LAST_INSERT_ID(), 1, 1, 'INPUT', NULL, 3, 1, '2019-07-02 14:56:51', '2019-07-02 14:56:52', 'BTN Link', 0);");
$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 ('hotspot_btn_label', LAST_INSERT_ID(), 1, 1, 'INPUT', NULL, 4, 1, '2019-07-02 14:57:28', '2019-07-02 14:57:28', 'BTN Label', 0);");
$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 ('hotspot_image', LAST_INSERT_ID(), 1, 1, 'HOTSPOT', NULL, 5, 1, '2019-05-03 10:27:56', '2019-05-03 10:27:57', 'Hotspot Image', 0);");
$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 ('hotspot_page', LAST_INSERT_ID(), 1, 1, 'COMBO_PAGES', '{\"render\": false, \"content_type\": \"all\"}', 6, 1, '2019-05-03 17:32:58', '2019-05-03 17:32:58', 'Hotspot Link to Page', 1);");
$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 ('hotspot_skin', LAST_INSERT_ID(), 1, 1, 'COMBO', '{\"data\": [{\"Skin 1\": \"skin_1\"}, {\"Skin 2\": \"skin_2\"}], \"type\": \"static\", \"render\": false, \"default\": \"skin_2\"}', 7, 1, '2019-05-03 17:31:58', '2019-05-03 17:31:59', 'Hotspot Skin', 1);");
$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 ('hotspot_link', LAST_INSERT_ID(), 1, 1, 'INPUT', '{\"render\": false}', 8, 1, '2019-07-02 14:59:16', '2019-07-02 14:59:17', 'Hotspot Link', 1);");
$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 ('hotspot_link_target', LAST_INSERT_ID(), 1, 1, 'COMBO', '{\"data\": [{\"Same window\": \"_self\"}, {\"New Window\": \"_blank\"}], \"type\": \"static\", \"render\": false, \"default\": \"_self\"}', 9, 1, '2019-07-02 15:01:41', '2019-07-02 15:01:41', 'Hotspot Link Target', 1);");
$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 ('hotspot_price', LAST_INSERT_ID(), 1, 1, 'INPUT', '{\"render\": false}', 10, 1, '2019-03-28 11:55:37', '2019-03-28 11:55:37', 'Hotspot Price', 1);");
$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 ('hotspot_price_old', LAST_INSERT_ID(), 1, 1, 'INPUT', '{\"render\": false}', 11, 1, '2019-03-28 11:55:37', '2019-03-28 11:55:37', 'Hotspot Price Old', 1);");
$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 ('hotspot_price_label', LAST_INSERT_ID(), 1, 1, 'INPUT', '{\"render\": false}', 12, 1, '2019-03-28 11:55:37', '2019-03-28 11:55:37', 'Hotspot Price Label', 1);");
$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 ('hotspot_price_disc_perc', LAST_INSERT_ID(), 1, 1, 'INPUT', '{\"render\": false}', 13, 1, '2019-03-28 11:55:37', '2019-03-28 11:55:37', 'Hotspot Price Discount %', 1);");
$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 ('hotspot_price_style', LAST_INSERT_ID(), 1, 1, 'COMBO', '{\"data\": [{\"Promo\": \"promo\"}, {\"Desde\": \"desde\"}], \"type\": \"static\", \"render\": false, \"default\": \"desde\"}', 14, 1, '2019-03-28 11:55:37', '2019-03-28 11:55:37', 'Hotspot Price Style', 1);");
$this->addSql("INSERT INTO `std_content_types_blocks` (`content_type`, `block_id`) VALUES ((SELECT id FROM std_content_types WHERE machine_name='pages'), (SELECT id FROM std_blocks WHERE machine_name='block_hotspot'));");
$this->addSql("INSERT INTO `std_content_types_blocks` (`content_type`, `block_id`) VALUES ((SELECT id FROM std_content_types WHERE machine_name='pages_categories'), (SELECT id FROM std_blocks WHERE machine_name='block_hotspot'));");
$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 ('hotspot_target_title', (SELECT id FROM std_blocks WHERE machine_name = 'block_hotspot'), 1, 1, 'INPUT', '{\"render\": false}', 9.5, 1, '2019-07-02 14:59:16', '2019-07-02 14:59:17', 'Hotspot Title', 1);");
$this->addSql("UPDATE `std_blocks_components` SET `settings`='{\"data\": [{\"Skin 1\": \"skin_1\"}, {\"Skin 2\": \"skin_2\"}, {\"Modal\": \"modal\"}], \"type\": \"static\", \"render\": false, \"default\": \"skin_2\"}' WHERE `block_id`= (SELECT id FROM std_blocks WHERE machine_name = 'block_hotspot') AND `machine_name`='hotspot_skin';");
}
public function down(Schema $schema) : void
{
$this->addSql("DELETE FROM std_content_types_blocks WHERE block_id = (SELECT id FROM std_blocks WHERE machine_name = 'block_hotspot');");
$this->addSql("DELETE FROM std_blocks_components WHERE block_id = (SELECT id FROM std_blocks WHERE machine_name = 'block_hotspot');");
$this->addSql("DELETE FROM std_blocks WHERE machine_name = 'block_hotspot';");
$this->addSql("DELETE FROM std_blocks_components WHERE machine_name = 'hotspot_target_title'");
$this->addSql("UPDATE `std_blocks_components` SET `settings`='{\"data\": [{\"Skin 1\": \"skin_1\"}, {\"Skin 2\": \"skin_2\"}], \"type\": \"static\", \"render\": false, \"default\": \"skin_2\"}' WHERE `block_id`= (SELECT id FROM std_blocks WHERE machine_name = 'block_hotspot') AND `machine_name`='hotspot_skin';");
}
}