<?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 Version20240108081231 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__product CHANGE options options LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\'');
$this->addSql('ALTER TABLE projects_bundle__project_quotation DROP FOREIGN KEY FK_35DF4AB4B4EA4E60');
$this->addSql('DROP INDEX UNIQ_35DF4AB4B4EA4E60 ON projects_bundle__project_quotation');
$this->addSql('ALTER TABLE projects_bundle__project_quotation DROP quotation_id');
$this->addSql('ALTER TABLE projects_bundle__task_time DROP FOREIGN KEY FK_3040BF2759E5119C');
$this->addSql('DROP INDEX IDX_3040BF2759E5119C ON projects_bundle__task_time');
$this->addSql('ALTER TABLE projects_bundle__task_time DROP slot_id');
$this->addSql('ALTER TABLE sales_bundle__invoice DROP FOREIGN KEY FK_BB8C2B4C9F85F85C');
$this->addSql('DROP INDEX IDX_BB8C2B4C9F85F85C ON sales_bundle__invoice');
$this->addSql('ALTER TABLE sales_bundle__invoice DROP recurring_invoice_id');
$this->addSql('ALTER TABLE sales_bundle__order_line DROP stock_reserved');
$this->addSql('ALTER TABLE shipments_bundle__burst DROP FOREIGN KEY FK_561AB41729DA275F');
$this->addSql('ALTER TABLE shipments_bundle__burst DROP FOREIGN KEY FK_561AB417EAC78616');
$this->addSql('DROP INDEX reference ON shipments_bundle__burst');
$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, DROP reference');
$this->addSql('ALTER TABLE stocks_bundle__stock_order_line DROP FOREIGN KEY FK_C168A566BB01DC09');
$this->addSql('DROP INDEX UNIQ_C168A566BB01DC09 ON stocks_bundle__stock_order_line');
$this->addSql('ALTER TABLE stocks_bundle__stock_order_line DROP order_line_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE stocks_bundle__stock_order_line ADD order_line_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE stocks_bundle__stock_order_line ADD CONSTRAINT FK_C168A566BB01DC09 FOREIGN KEY (order_line_id) REFERENCES sales_bundle__order_line (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C168A566BB01DC09 ON stocks_bundle__stock_order_line (order_line_id)');
$this->addSql('ALTER TABLE projects_bundle__task_time ADD slot_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE projects_bundle__task_time ADD CONSTRAINT FK_3040BF2759E5119C FOREIGN KEY (slot_id) REFERENCES planning_bundle__slot (id)');
$this->addSql('CREATE INDEX IDX_3040BF2759E5119C ON projects_bundle__task_time (slot_id)');
$this->addSql('ALTER TABLE sales_bundle__order_line ADD stock_reserved TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE products_bundle__product CHANGE options options LONGTEXT DEFAULT NULL COLLATE `utf8mb4_bin`');
$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)\', ADD reference VARCHAR(128) DEFAULT NULL');
$this->addSql('ALTER TABLE shipments_bundle__burst ADD CONSTRAINT FK_561AB41729DA275F FOREIGN KEY (shipment_manager_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shipments_bundle__burst ADD CONSTRAINT FK_561AB417EAC78616 FOREIGN KEY (preparation_manager_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX reference ON shipments_bundle__burst (reference)');
$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)');
$this->addSql('ALTER TABLE projects_bundle__project_quotation ADD quotation_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE projects_bundle__project_quotation ADD CONSTRAINT FK_35DF4AB4B4EA4E60 FOREIGN KEY (quotation_id) REFERENCES sales_bundle__quotation (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_35DF4AB4B4EA4E60 ON projects_bundle__project_quotation (quotation_id)');
$this->addSql('ALTER TABLE sales_bundle__invoice ADD recurring_invoice_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__invoice ADD CONSTRAINT FK_BB8C2B4C9F85F85C FOREIGN KEY (recurring_invoice_id) REFERENCES recurring_invoices_bundle__recurring_invoice (id)');
$this->addSql('CREATE INDEX IDX_BB8C2B4C9F85F85C ON sales_bundle__invoice (recurring_invoice_id)');
}
}