<?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 Version20231214234754 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 recommendation (id INT AUTO_INCREMENT NOT NULL, domain_id INT NOT NULL, title LONGTEXT NOT NULL, is_implemented TINYINT(1) NOT NULL, discr VARCHAR(255) NOT NULL, action LONGTEXT DEFAULT NULL, benefit LONGTEXT DEFAULT NULL, severity DOUBLE PRECISION DEFAULT NULL, recommendation LONGTEXT DEFAULT NULL, uses LONGTEXT DEFAULT NULL, risk LONGTEXT DEFAULT NULL, INDEX IDX_433224D2115F0EE5 (domain_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE recommendation ADD CONSTRAINT FK_433224D2115F0EE5 FOREIGN KEY (domain_id) REFERENCES domain (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE recommendation DROP FOREIGN KEY FK_433224D2115F0EE5');
$this->addSql('DROP TABLE recommendation');
}
}