<?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 Version20221207102813 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('ALTER TABLE survey ADD shape_id INT DEFAULT NULL, ADD skintone VARCHAR(255) DEFAULT NULL, ADD size INT DEFAULT NULL, ADD type VARCHAR(255) DEFAULT NULL, ADD nose_size LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\'');
$this->addSql('ALTER TABLE survey ADD CONSTRAINT FK_AD5F9BFC50266CBB FOREIGN KEY (shape_id) REFERENCES shape (id)');
$this->addSql('CREATE INDEX IDX_AD5F9BFC50266CBB ON survey (shape_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE `survey` DROP FOREIGN KEY FK_AD5F9BFC50266CBB');
$this->addSql('DROP INDEX IDX_AD5F9BFC50266CBB ON `survey`');
$this->addSql('ALTER TABLE `survey` DROP shape_id, DROP skintone, DROP size, DROP type, DROP nose_size');
}
}