<?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 Version20230607101824 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 price ADD type_pitch_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE price ADD CONSTRAINT FK_CAC822D93310E1B7 FOREIGN KEY (type_pitch_id) REFERENCES type_pitch (id)');
$this->addSql('CREATE INDEX IDX_CAC822D93310E1B7 ON price (type_pitch_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_2993392E77153098 ON type_pitch (code)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE price DROP FOREIGN KEY FK_CAC822D93310E1B7');
$this->addSql('DROP INDEX IDX_CAC822D93310E1B7 ON price');
$this->addSql('ALTER TABLE price DROP type_pitch_id');
$this->addSql('DROP INDEX UNIQ_2993392E77153098 ON type_pitch');
}
}