<?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 Version20230307071639 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 player_memberships ADD player_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE player_memberships ADD CONSTRAINT FK_DE6DAEE399E6F5DF FOREIGN KEY (player_id) REFERENCES tennis_players (id)');
$this->addSql('CREATE INDEX IDX_DE6DAEE399E6F5DF ON player_memberships (player_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE player_memberships DROP FOREIGN KEY FK_DE6DAEE399E6F5DF');
$this->addSql('DROP INDEX IDX_DE6DAEE399E6F5DF ON player_memberships');
$this->addSql('ALTER TABLE player_memberships DROP player_id');
}
}