src/Migrations/Version20201031125859.php line 1
<?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 Version20201031125859 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 olympiad_level ADD logo_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE olympiad_level ADD CONSTRAINT FK_7939BA7FF98F144A FOREIGN KEY (logo_id) REFERENCES files (id)');
$this->addSql('CREATE INDEX IDX_7939BA7FF98F144A ON olympiad_level (logo_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE olympiad_level DROP FOREIGN KEY FK_7939BA7FF98F144A');
$this->addSql('DROP INDEX IDX_7939BA7FF98F144A ON olympiad_level');
$this->addSql('ALTER TABLE olympiad_level DROP logo_id');
}
}