<?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 Version20240610115340 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 game_quiz_question DROP FOREIGN KEY FK_CAD72C60561E01C5');
$this->addSql('DROP TABLE game_quiz_question_difficulty');
$this->addSql('CREATE TABLE game_difficulty (id INT AUTO_INCREMENT NOT NULL, difficulty_name VARCHAR(191) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE game_quiz_question ADD CONSTRAINT FK_CAD72C60561E01C5 FOREIGN KEY (game_difficulty_id) REFERENCES game_difficulty (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE game_quiz_question DROP FOREIGN KEY FK_CAD72C60561E01C5');
$this->addSql('DROP TABLE game_difficulty');
$this->addSql('CREATE TABLE game_quiz_question_difficulty (id INT AUTO_INCREMENT NOT NULL, difficultyName VARCHAR(191) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE game_quiz_question ADD CONSTRAINT FK_CAD72C60561E01C5 FOREIGN KEY (game_difficulty_id) REFERENCES game_quiz_question_difficulty (id)');
}
}