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