<?php
declare(strict_types=1);
namespace ProductsBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230621080417 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE products_bundle__pack_product ADD declination_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE products_bundle__pack_product ADD CONSTRAINT FK_D52AD2E09941A932 FOREIGN KEY (declination_id) REFERENCES products_bundle__declination (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_D52AD2E09941A932 ON products_bundle__pack_product (declination_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE products_bundle__pack_product DROP FOREIGN KEY FK_D52AD2E09941A932');
$this->addSql('DROP INDEX UNIQ_D52AD2E09941A932 ON products_bundle__pack_product');
$this->addSql('ALTER TABLE products_bundle__pack_product DROP declination_id');
}
}