<?php
declare(strict_types=1);
namespace CoreMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220708080904 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 products_bundle__declination ADD virtual_parent_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD virtual_quantity INT DEFAULT NULL');
$this->addSql('ALTER TABLE products_bundle__declination ADD CONSTRAINT FK_CC8BB12021C2B4E8 FOREIGN KEY (virtual_parent_id) REFERENCES products_bundle__declination (id)');
$this->addSql('CREATE INDEX IDX_CC8BB12021C2B4E8 ON products_bundle__declination (virtual_parent_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE products_bundle__declination DROP FOREIGN KEY FK_CC8BB12021C2B4E8');
$this->addSql('DROP INDEX IDX_CC8BB12021C2B4E8 ON products_bundle__declination');
$this->addSql('ALTER TABLE products_bundle__declination DROP virtual_parent_id, DROP virtual_quantity');
}
}