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