<?php
declare(strict_types=1);
namespace ProductsBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20240517094054 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE products_bundle__substitute_product ADD deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE products_bundle__substitute_product ADD CONSTRAINT FK_A685F3F8C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_A685F3F8C76F1F52 ON products_bundle__substitute_product (deleted_by_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE products_bundle__substitute_product DROP FOREIGN KEY FK_A685F3F8C76F1F52');
$this->addSql('DROP INDEX IDX_A685F3F8C76F1F52 ON products_bundle__substitute_product');
$this->addSql('ALTER TABLE products_bundle__substitute_product DROP deleted_by_id, DROP deleted_at');
}
}