<?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 Version20240624091214 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 game_category_mapping (game_id INT NOT NULL, game_category_id INT NOT NULL, INDEX IDX_B02FABE8E48FD905 (game_id), INDEX IDX_B02FABE8CC13DFE0 (game_category_id), PRIMARY KEY(game_id, game_category_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE game_category_mapping ADD CONSTRAINT FK_B02FABE8E48FD905 FOREIGN KEY (game_id) REFERENCES game (id)');
$this->addSql('ALTER TABLE game_category_mapping ADD CONSTRAINT FK_B02FABE8CC13DFE0 FOREIGN KEY (game_category_id) REFERENCES game_category (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE game_category_mapping DROP FOREIGN KEY FK_B02FABE8E48FD905');
$this->addSql('ALTER TABLE game_category_mapping DROP FOREIGN KEY FK_B02FABE8CC13DFE0');
$this->addSql('DROP TABLE game_category_mapping');
}
}