<?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 Version20221215091105 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 emotion_size (id INT AUTO_INCREMENT NOT NULL, emotion_id INT NOT NULL, size INT NOT NULL, INDEX IDX_31A481B61EE4A582 (emotion_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE emotion_size ADD CONSTRAINT FK_31A481B61EE4A582 FOREIGN KEY (emotion_id) REFERENCES emotion (id)');
$this->addSql('ALTER TABLE survey CHANGE nose_size nose_size VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE emotion_size');
$this->addSql('ALTER TABLE `survey` CHANGE nose_size nose_size LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\'');
}
}