<?php
declare(strict_types=1);
namespace SalesBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20231108154220 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE sales_bundle__customer_options ADD default_order_state_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD default_reduced_tax_rule_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD default_reduced_vat TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE sales_bundle__customer_options ADD CONSTRAINT FK_5E01AC2260A8BE32 FOREIGN KEY (default_order_state_id) REFERENCES sales_bundle__order_state (id)');
$this->addSql('ALTER TABLE sales_bundle__customer_options ADD CONSTRAINT FK_5E01AC225C549B50 FOREIGN KEY (default_reduced_tax_rule_id) REFERENCES tax_rule (id)');
$this->addSql('CREATE INDEX IDX_5E01AC2260A8BE32 ON sales_bundle__customer_options (default_order_state_id)');
$this->addSql('CREATE INDEX IDX_5E01AC225C549B50 ON sales_bundle__customer_options (default_reduced_tax_rule_id)');
$this->addSql('CREATE INDEX default_reduced_vat ON sales_bundle__customer_options (default_reduced_vat)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE sales_bundle__customer_options DROP FOREIGN KEY FK_5E01AC2260A8BE32');
$this->addSql('ALTER TABLE sales_bundle__customer_options DROP FOREIGN KEY FK_5E01AC225C549B50');
$this->addSql('DROP INDEX IDX_5E01AC2260A8BE32 ON sales_bundle__customer_options');
$this->addSql('DROP INDEX IDX_5E01AC225C549B50 ON sales_bundle__customer_options');
$this->addSql('DROP INDEX default_reduced_vat ON sales_bundle__customer_options');
$this->addSql('ALTER TABLE sales_bundle__customer_options DROP default_order_state_id, DROP default_reduced_tax_rule_id, DROP default_reduced_vat');
}
}