<?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 Version20190507095649 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE std_config CHANGE machine_name machine_name VARCHAR(50) NOT NULL COMMENT \'Unique code used in the programming to identify the config variable\'');
$this->addSql('ALTER TABLE std_languages CHANGE language_code language_code VARCHAR(2) NOT NULL COMMENT \'ISO 639 Language code\'');
$this->addSql("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 ('setting_form_cols', 17, 1, 1, 'Form cols', 'INPUT', 1, '2019-03-19 14:09:58', '2019-03-19 14:10:00', 1, NULL);");
$this->addSql("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 ('setting_form_cols', 18, 1, 1, 'Form cols', 'INPUT', 1, '2019-03-19 14:09:58', '2019-03-19 14:10:00', 1, NULL);");
$this->addSql("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 ('setting_form_cols', 19, 1, 1, 'Form cols', 'INPUT', 1, '2019-03-19 14:09:58', '2019-03-19 14:10:00', 1, NULL);");
$this->addSql("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 ('setting_form_cols', 20, 1, 1, 'Form cols', 'INPUT', 1, '2019-03-19 14:09:58', '2019-03-19 14:10:00', 1, NULL);");
$this->addSql("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 ('setting_form_cols', 21, 1, 1, 'Form cols', 'INPUT', 1, '2019-03-19 14:09:58', '2019-03-19 14:10:00', 1, NULL);");
$this->addSql("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 ('setting_form_cols', 28, 1, 1, 'Form cols', 'INPUT', 1, '2019-03-19 14:09:58', '2019-03-19 14:10:00', 1, NULL);");
$this->addSql("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 ('setting_form_cols', 30, 1, 1, 'Form cols', 'INPUT', 1, '2019-03-19 14:09:58', '2019-03-19 14:10:00', 1, NULL);");
$this->addSql("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 ('setting_form_cols', 29, 1, 1, 'Form cols', 'INPUT', 1, '2019-03-19 14:09:58', '2019-03-19 14:10:00', 1, NULL);");
$this->addSql("INSERT INTO `std_blocks_skins` (`block_id`, `machine_name`, `name`, `is_active`, `created_by`, `created_date`, `updated_by`, `updated_date`) VALUES (2, 'default1', 'Title Form', 1, 1, '2019-03-29 15:47:30', 1, '2019-03-29 15:47:30');");
$this->addSql("INSERT INTO `std_content_types_components` (`content_type_id`, `machine_name`, `component_type`, `order_value`, `is_active`, `created_by`, `created_date`, `updated_by`, `updated_date`, `name`, `settings`) VALUES (5, 'form_title', 'INPUT', 1, 1, 1, '2019-03-22 14:45:23', 1, '2019-03-22 14:45:25', 'Title', NULL);");
$this->addSql("INSERT INTO `std_content_types_components` (`content_type_id`, `machine_name`, `component_type`, `order_value`, `is_active`, `created_by`, `created_date`, `updated_by`, `updated_date`, `name`, `settings`) VALUES (5, 'form_subtitle', 'INPUT', 2, 1, 1, '2019-03-22 14:45:23', 1, '2019-03-22 14:45:25', 'Subtitle', NULL);");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 3 WHERE content_type_id = 5 AND machine_name LIKE 'form_name';");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 4 WHERE content_type_id = 5 AND machine_name LIKE 'form_email_to';");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 5 WHERE content_type_id = 5 AND machine_name LIKE 'form_email_sender';");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 6 WHERE content_type_id = 5 AND machine_name LIKE 'form_redirect';");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 7 WHERE content_type_id = 5 AND machine_name LIKE 'form_input_email_to_send';");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 8 WHERE content_type_id = 5 AND machine_name LIKE 'form_email_from';");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 9 WHERE content_type_id = 5 AND machine_name LIKE 'form_email_subject';");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 10 WHERE content_type_id = 5 AND machine_name LIKE 'form_email_body';");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 11 WHERE content_type_id = 5 AND machine_name LIKE 'form_email_admin_subject';");
$this->addSql("UPDATE `std_content_types_components` SET order_value = 12 WHERE content_type_id = 5 AND machine_name LIKE 'form_email_admin_body';");
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE std_config CHANGE machine_name machine_name VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci COMMENT \'Unique code used in the programming to identify the config variable\'');
$this->addSql('ALTER TABLE std_languages CHANGE language_code language_code VARCHAR(2) NOT NULL COLLATE utf8mb4_unicode_ci COMMENT \'ISO 639 Language code\'');
$this->addSql("DELETE FROM `std_blocks_settings` WHERE `machine_name` like 'setting_form_cols' and `block_id` = 17");
$this->addSql("DELETE FROM `std_blocks_settings` WHERE `machine_name` like 'setting_form_cols' and `block_id` = 18");
$this->addSql("DELETE FROM `std_blocks_settings` WHERE `machine_name` like 'setting_form_cols' and `block_id` = 19");
$this->addSql("DELETE FROM `std_blocks_settings` WHERE `machine_name` like 'setting_form_cols' and `block_id` = 20");
$this->addSql("DELETE FROM `std_blocks_settings` WHERE `machine_name` like 'setting_form_cols' and `block_id` = 21");
$this->addSql("DELETE FROM `std_blocks_settings` WHERE `machine_name` like 'setting_form_cols' and `block_id` = 28");
$this->addSql("DELETE FROM `std_blocks_settings` WHERE `machine_name` like 'setting_form_cols' and `block_id` = 30");
$this->addSql("DELETE FROM `std_blocks_settings` WHERE `machine_name` like 'setting_form_cols' and `block_id` = 29");
$this->addSql("DELETE FROM `std_blocks_skins` WHERE `machine_name` like 'default1' and `block_id` = 2");
$this->addSql("DELETE FROM `std_content_types_components` WHERE `machine_name` like 'form_title' and `content_type_id` = 5");
$this->addSql("DELETE FROM `std_content_types_components` WHERE `machine_name` like 'form_subtitle' and `content_type_id` = 5");
}
}