migrations/Version20240108081231.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace CoreMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240108081231 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE products_bundle__product CHANGE options options LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\'');
  19.         $this->addSql('ALTER TABLE projects_bundle__project_quotation DROP FOREIGN KEY FK_35DF4AB4B4EA4E60');
  20.         $this->addSql('DROP INDEX UNIQ_35DF4AB4B4EA4E60 ON projects_bundle__project_quotation');
  21.         $this->addSql('ALTER TABLE projects_bundle__project_quotation DROP quotation_id');
  22.         $this->addSql('ALTER TABLE projects_bundle__task_time DROP FOREIGN KEY FK_3040BF2759E5119C');
  23.         $this->addSql('DROP INDEX IDX_3040BF2759E5119C ON projects_bundle__task_time');
  24.         $this->addSql('ALTER TABLE projects_bundle__task_time DROP slot_id');
  25.         $this->addSql('ALTER TABLE sales_bundle__invoice DROP FOREIGN KEY FK_BB8C2B4C9F85F85C');
  26.         $this->addSql('DROP INDEX IDX_BB8C2B4C9F85F85C ON sales_bundle__invoice');
  27.         $this->addSql('ALTER TABLE sales_bundle__invoice DROP recurring_invoice_id');
  28.         $this->addSql('ALTER TABLE sales_bundle__order_line DROP stock_reserved');
  29.         $this->addSql('ALTER TABLE shipments_bundle__burst DROP FOREIGN KEY FK_561AB41729DA275F');
  30.         $this->addSql('ALTER TABLE shipments_bundle__burst DROP FOREIGN KEY FK_561AB417EAC78616');
  31.         $this->addSql('DROP INDEX reference ON shipments_bundle__burst');
  32.         $this->addSql('DROP INDEX IDX_561AB417EAC78616 ON shipments_bundle__burst');
  33.         $this->addSql('DROP INDEX IDX_561AB41729DA275F ON shipments_bundle__burst');
  34.         $this->addSql('ALTER TABLE shipments_bundle__burst DROP preparation_manager_id, DROP shipment_manager_id, DROP reference');
  35.         $this->addSql('ALTER TABLE stocks_bundle__stock_order_line DROP FOREIGN KEY FK_C168A566BB01DC09');
  36.         $this->addSql('DROP INDEX UNIQ_C168A566BB01DC09 ON stocks_bundle__stock_order_line');
  37.         $this->addSql('ALTER TABLE stocks_bundle__stock_order_line DROP order_line_id');
  38.     }
  39.     public function down(Schema $schema): void
  40.     {
  41.         // this down() migration is auto-generated, please modify it to your needs
  42.         $this->addSql('ALTER TABLE stocks_bundle__stock_order_line ADD order_line_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
  43.         $this->addSql('ALTER TABLE stocks_bundle__stock_order_line ADD CONSTRAINT FK_C168A566BB01DC09 FOREIGN KEY (order_line_id) REFERENCES sales_bundle__order_line (id)');
  44.         $this->addSql('CREATE UNIQUE INDEX UNIQ_C168A566BB01DC09 ON stocks_bundle__stock_order_line (order_line_id)');
  45.         $this->addSql('ALTER TABLE projects_bundle__task_time ADD slot_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
  46.         $this->addSql('ALTER TABLE projects_bundle__task_time ADD CONSTRAINT FK_3040BF2759E5119C FOREIGN KEY (slot_id) REFERENCES planning_bundle__slot (id)');
  47.         $this->addSql('CREATE INDEX IDX_3040BF2759E5119C ON projects_bundle__task_time (slot_id)');
  48.         $this->addSql('ALTER TABLE sales_bundle__order_line ADD stock_reserved TINYINT(1) DEFAULT 0 NOT NULL');
  49.         $this->addSql('ALTER TABLE products_bundle__product CHANGE options options LONGTEXT DEFAULT NULL COLLATE `utf8mb4_bin`');
  50.         $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');
  51.         $this->addSql('ALTER TABLE shipments_bundle__burst ADD CONSTRAINT FK_561AB41729DA275F FOREIGN KEY (shipment_manager_id) REFERENCES user (id)');
  52.         $this->addSql('ALTER TABLE shipments_bundle__burst ADD CONSTRAINT FK_561AB417EAC78616 FOREIGN KEY (preparation_manager_id) REFERENCES user (id)');
  53.         $this->addSql('CREATE INDEX reference ON shipments_bundle__burst (reference)');
  54.         $this->addSql('CREATE INDEX IDX_561AB417EAC78616 ON shipments_bundle__burst (preparation_manager_id)');
  55.         $this->addSql('CREATE INDEX IDX_561AB41729DA275F ON shipments_bundle__burst (shipment_manager_id)');
  56.         $this->addSql('ALTER TABLE projects_bundle__project_quotation ADD quotation_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
  57.         $this->addSql('ALTER TABLE projects_bundle__project_quotation ADD CONSTRAINT FK_35DF4AB4B4EA4E60 FOREIGN KEY (quotation_id) REFERENCES sales_bundle__quotation (id)');
  58.         $this->addSql('CREATE UNIQUE INDEX UNIQ_35DF4AB4B4EA4E60 ON projects_bundle__project_quotation (quotation_id)');
  59.         $this->addSql('ALTER TABLE sales_bundle__invoice ADD recurring_invoice_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
  60.         $this->addSql('ALTER TABLE sales_bundle__invoice ADD CONSTRAINT FK_BB8C2B4C9F85F85C FOREIGN KEY (recurring_invoice_id) REFERENCES recurring_invoices_bundle__recurring_invoice (id)');
  61.         $this->addSql('CREATE INDEX IDX_BB8C2B4C9F85F85C ON sales_bundle__invoice (recurring_invoice_id)');
  62.     }
  63. }