<?php
declare(strict_types=1);
namespace SalesBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use Symfony\Component\Uid\UuidV6;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240709082440 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 sales_bundle__credit_note_line ADD product_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD declination_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__credit_note_line ADD CONSTRAINT FK_224DA1A74584665A FOREIGN KEY (product_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE sales_bundle__credit_note_line ADD CONSTRAINT FK_224DA1A79941A932 FOREIGN KEY (declination_id) REFERENCES products_bundle__declination (id)');
$this->addSql('CREATE INDEX IDX_224DA1A74584665A ON sales_bundle__credit_note_line (product_id)');
$this->addSql('CREATE INDEX IDX_224DA1A79941A932 ON sales_bundle__credit_note_line (declination_id)');
$this->addSql('ALTER TABLE sales_bundle__delivery_note_line ADD product_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD declination_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__delivery_note_line ADD CONSTRAINT FK_CF8E237F4584665A FOREIGN KEY (product_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE sales_bundle__delivery_note_line ADD CONSTRAINT FK_CF8E237F9941A932 FOREIGN KEY (declination_id) REFERENCES products_bundle__declination (id)');
$this->addSql('CREATE INDEX IDX_CF8E237F4584665A ON sales_bundle__delivery_note_line (product_id)');
$this->addSql('CREATE INDEX IDX_CF8E237F9941A932 ON sales_bundle__delivery_note_line (declination_id)');
$this->addSql('ALTER TABLE sales_bundle__invoice_line ADD product_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD declination_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__invoice_line ADD CONSTRAINT FK_891FCC0D4584665A FOREIGN KEY (product_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE sales_bundle__invoice_line ADD CONSTRAINT FK_891FCC0D9941A932 FOREIGN KEY (declination_id) REFERENCES products_bundle__declination (id)');
$this->addSql('CREATE INDEX IDX_891FCC0D4584665A ON sales_bundle__invoice_line (product_id)');
$this->addSql('CREATE INDEX IDX_891FCC0D9941A932 ON sales_bundle__invoice_line (declination_id)');
$this->addSql('ALTER TABLE sales_bundle__order_line ADD product_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD declination_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__order_line ADD CONSTRAINT FK_38D3FC514584665A FOREIGN KEY (product_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE sales_bundle__order_line ADD CONSTRAINT FK_38D3FC519941A932 FOREIGN KEY (declination_id) REFERENCES products_bundle__declination (id)');
$this->addSql('CREATE INDEX IDX_38D3FC514584665A ON sales_bundle__order_line (product_id)');
$this->addSql('CREATE INDEX IDX_38D3FC519941A932 ON sales_bundle__order_line (declination_id)');
$this->addSql('ALTER TABLE sales_bundle__quotation_line ADD product_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD declination_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__quotation_line ADD CONSTRAINT FK_5E40159A4584665A FOREIGN KEY (product_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE sales_bundle__quotation_line ADD CONSTRAINT FK_5E40159A9941A932 FOREIGN KEY (declination_id) REFERENCES products_bundle__declination (id)');
$this->addSql('CREATE INDEX IDX_5E40159A4584665A ON sales_bundle__quotation_line (product_id)');
$this->addSql('CREATE INDEX IDX_5E40159A9941A932 ON sales_bundle__quotation_line (declination_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE sales_bundle__credit_note_line DROP FOREIGN KEY FK_224DA1A74584665A');
$this->addSql('ALTER TABLE sales_bundle__credit_note_line DROP FOREIGN KEY FK_224DA1A79941A932');
$this->addSql('DROP INDEX IDX_224DA1A74584665A ON sales_bundle__credit_note_line');
$this->addSql('DROP INDEX IDX_224DA1A79941A932 ON sales_bundle__credit_note_line');
$this->addSql('ALTER TABLE sales_bundle__credit_note_line DROP product_id, DROP declination_id');
$this->addSql('ALTER TABLE sales_bundle__delivery_note_line DROP FOREIGN KEY FK_CF8E237F4584665A');
$this->addSql('ALTER TABLE sales_bundle__delivery_note_line DROP FOREIGN KEY FK_CF8E237F9941A932');
$this->addSql('DROP INDEX IDX_CF8E237F4584665A ON sales_bundle__delivery_note_line');
$this->addSql('DROP INDEX IDX_CF8E237F9941A932 ON sales_bundle__delivery_note_line');
$this->addSql('ALTER TABLE sales_bundle__delivery_note_line DROP product_id, DROP declination_id');
$this->addSql('ALTER TABLE sales_bundle__invoice_line DROP FOREIGN KEY FK_891FCC0D4584665A');
$this->addSql('ALTER TABLE sales_bundle__invoice_line DROP FOREIGN KEY FK_891FCC0D9941A932');
$this->addSql('DROP INDEX IDX_891FCC0D4584665A ON sales_bundle__invoice_line');
$this->addSql('DROP INDEX IDX_891FCC0D9941A932 ON sales_bundle__invoice_line');
$this->addSql('ALTER TABLE sales_bundle__invoice_line DROP product_id, DROP declination_id');
$this->addSql('ALTER TABLE sales_bundle__order_line DROP FOREIGN KEY FK_38D3FC514584665A');
$this->addSql('ALTER TABLE sales_bundle__order_line DROP FOREIGN KEY FK_38D3FC519941A932');
$this->addSql('DROP INDEX IDX_38D3FC514584665A ON sales_bundle__order_line');
$this->addSql('DROP INDEX IDX_38D3FC519941A932 ON sales_bundle__order_line');
$this->addSql('ALTER TABLE sales_bundle__order_line DROP product_id, DROP declination_id');
$this->addSql('ALTER TABLE sales_bundle__quotation_line DROP FOREIGN KEY FK_5E40159A4584665A');
$this->addSql('ALTER TABLE sales_bundle__quotation_line DROP FOREIGN KEY FK_5E40159A9941A932');
$this->addSql('DROP INDEX IDX_5E40159A4584665A ON sales_bundle__quotation_line');
$this->addSql('DROP INDEX IDX_5E40159A9941A932 ON sales_bundle__quotation_line');
$this->addSql('ALTER TABLE sales_bundle__quotation_line DROP product_id, DROP declination_id');
}
}