<?php
declare(strict_types=1);
namespace PPSDKDoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20220426150117_TipContestTeamPrize extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE tip_contests_participants_teams ADD prize_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE tip_contests_participants_teams ADD CONSTRAINT FK_31B7A436BBE43214 FOREIGN KEY (prize_id) REFERENCES tip_contests_prizes (id)');
$this->addSql('CREATE INDEX IDX_31B7A436BBE43214 ON tip_contests_participants_teams (prize_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE tip_contests_participants_teams DROP FOREIGN KEY FK_31B7A436BBE43214');
$this->addSql('DROP INDEX IDX_31B7A436BBE43214 ON tip_contests_participants_teams');
$this->addSql('ALTER TABLE tip_contests_participants_teams DROP prize_id');
}
}