<?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 Version20221030124107 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('CREATE TABLE compound_inputs (id INT AUTO_INCREMENT NOT NULL, custom_input_id INT NOT NULL, sort_order INT NOT NULL, text VARCHAR(255) NOT NULL, date_added DATETIME NOT NULL, date_modified DATETIME NOT NULL, INDEX IDX_473E6C90D390FDB2 (custom_input_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE compound_inputs ADD CONSTRAINT FK_473E6C90D390FDB2 FOREIGN KEY (custom_input_id) REFERENCES custom_input (id)');
$this->addSql('ALTER TABLE custom_input CHANGE help help VARCHAR(400) DEFAULT NULL');
$this->addSql("INSERT INTO `input_type` (`id`, `name`, `fqcn`) VALUES (8, 'CompoundTextType', 'App\\\Form\\\CompoundTextType');");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE compound_inputs DROP FOREIGN KEY FK_473E6C90D390FDB2');
$this->addSql('DROP TABLE compound_inputs');
$this->addSql('ALTER TABLE custom_input CHANGE help help VARCHAR(400) NOT NULL');
$this->addSql('DELETE FROM `input_type` WHERE `id` = 8');
}
}