<?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 Version20240829074810 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_school_class_highscore (id INT AUTO_INCREMENT NOT NULL, school_class_id INT DEFAULT NULL, game_type_id INT DEFAULT NULL, game_category_id INT DEFAULT NULL, round_number INT DEFAULT NULL, points INT DEFAULT NULL, update_at DATETIME NOT NULL, INDEX IDX_8C10FA4A14463F54 (school_class_id), INDEX IDX_8C10FA4A508EF3BC (game_type_id), INDEX IDX_8C10FA4ACC13DFE0 (game_category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE game_school_class_highscore ADD CONSTRAINT FK_8C10FA4A14463F54 FOREIGN KEY (school_class_id) REFERENCES school_class (id)');
$this->addSql('ALTER TABLE game_school_class_highscore ADD CONSTRAINT FK_8C10FA4A508EF3BC FOREIGN KEY (game_type_id) REFERENCES game_type (id)');
$this->addSql('ALTER TABLE game_school_class_highscore ADD CONSTRAINT FK_8C10FA4ACC13DFE0 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_school_class_highscore DROP FOREIGN KEY FK_8C10FA4A14463F54');
$this->addSql('ALTER TABLE game_school_class_highscore DROP FOREIGN KEY FK_8C10FA4A508EF3BC');
$this->addSql('ALTER TABLE game_school_class_highscore DROP FOREIGN KEY FK_8C10FA4ACC13DFE0');
$this->addSql('DROP TABLE game_school_class_highscore');
}
}