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