<?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 Version20211110095957 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->addSql("SET @content_type_id=(select id from std_content_types where machine_name='forms')");
$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 (@content_type_id, 'form_allow_edit', 'CHECKBOX', 22, 1, 1, NOW(), 1, NOW(), 'form_allow_edit', 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 (@content_type_id, 'form_allow_resubmit', 'CHECKBOX', 23, 1, 1, NOW(), 1, NOW(), 'form_allow_resubmit', NULL);
");
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql("SET @content_type_id=(select id from std_content_types where machine_name='forms')");
$this->addSql("Delete from std_content_types_components where content_type_id=@content_type_id and machine_name in('form_allow_edit','form_allow_resubmit')");
}
}