<?php
declare(strict_types=1);
namespace ShipmentsBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20231228091204 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE shipments_bundle__burst ADD preparation_manager_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD shipment_manager_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE shipments_bundle__burst ADD CONSTRAINT FK_561AB417EAC78616 FOREIGN KEY (preparation_manager_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shipments_bundle__burst ADD CONSTRAINT FK_561AB41729DA275F FOREIGN KEY (shipment_manager_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_561AB417EAC78616 ON shipments_bundle__burst (preparation_manager_id)');
$this->addSql('CREATE INDEX IDX_561AB41729DA275F ON shipments_bundle__burst (shipment_manager_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE shipments_bundle__burst DROP FOREIGN KEY FK_561AB417EAC78616');
$this->addSql('ALTER TABLE shipments_bundle__burst DROP FOREIGN KEY FK_561AB41729DA275F');
$this->addSql('DROP INDEX IDX_561AB417EAC78616 ON shipments_bundle__burst');
$this->addSql('DROP INDEX IDX_561AB41729DA275F ON shipments_bundle__burst');
$this->addSql('ALTER TABLE shipments_bundle__burst DROP preparation_manager_id, DROP shipment_manager_id');
}
}