<?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 Version20220215132736 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 campaign DROP FOREIGN KEY FK_1F1512DDD7C827DA');
$this->addSql('DROP INDEX fk_1f1512ddd7c827da ON campaign');
$this->addSql('CREATE INDEX IDX_1F1512DDD7C827DA ON campaign (memory_game_id)');
$this->addSql('ALTER TABLE campaign ADD CONSTRAINT FK_1F1512DDD7C827DA FOREIGN KEY (memory_game_id) REFERENCES memory_game (id)');
$this->addSql('ALTER TABLE quiz_answares ADD type INT NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE campaign DROP FOREIGN KEY FK_1F1512DDD7C827DA');
$this->addSql('DROP INDEX idx_1f1512ddd7c827da ON campaign');
$this->addSql('CREATE INDEX FK_1F1512DDD7C827DA ON campaign (memory_game_id)');
$this->addSql('ALTER TABLE campaign ADD CONSTRAINT FK_1F1512DDD7C827DA FOREIGN KEY (memory_game_id) REFERENCES memory_game (id)');
$this->addSql('ALTER TABLE quiz_answares DROP type');
}
}