<?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 Version20211117142156 extends AbstractMigration
{
public function getDescription(): string
{
return 'Search match add Donate Type';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE search_match ADD donate_type_id INT NOT NULL');
$this->addSql('ALTER TABLE search_match ADD CONSTRAINT FK_4E6E06ECD3FE FOREIGN KEY (donate_type_id) REFERENCES donate_type (id)');
$this->addSql('CREATE INDEX IDX_4E6E06ECD3FE ON search_match (donate_type_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE search_match DROP FOREIGN KEY FK_4E6E06ECD3FE');
$this->addSql('DROP INDEX IDX_4E6E06ECD3FE ON search_match');
$this->addSql('ALTER TABLE search_match DROP donate_type_id');
}
public function isTransactional(): bool
{
return false;
}
}