<?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 Version20240703125736 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__order ADD payment_method_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__order ADD CONSTRAINT FK_FBA82B625AA1164F FOREIGN KEY (payment_method_id) REFERENCES sales_bundle__payment_method (id)');
$this->addSql('CREATE INDEX IDX_FBA82B625AA1164F ON sales_bundle__order (payment_method_id)');
$this->addSql('ALTER TABLE sales_bundle__credit_note ADD payment_method_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__credit_note ADD CONSTRAINT FK_3BAC0D75AA1164F FOREIGN KEY (payment_method_id) REFERENCES sales_bundle__payment_method (id)');
$this->addSql('CREATE INDEX IDX_3BAC0D75AA1164F ON sales_bundle__credit_note (payment_method_id)');
$this->addSql('ALTER TABLE sales_bundle__delivery_note ADD payment_method_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__delivery_note ADD CONSTRAINT FK_9CC42D75AA1164F FOREIGN KEY (payment_method_id) REFERENCES sales_bundle__payment_method (id)');
$this->addSql('CREATE INDEX IDX_9CC42D75AA1164F ON sales_bundle__delivery_note (payment_method_id)');
$this->addSql('ALTER TABLE sales_bundle__invoice ADD payment_method_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE sales_bundle__invoice ADD CONSTRAINT FK_BB8C2B4C5AA1164F FOREIGN KEY (payment_method_id) REFERENCES sales_bundle__payment_method (id)');
$this->addSql('CREATE INDEX IDX_BB8C2B4C5AA1164F ON sales_bundle__invoice (payment_method_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__order DROP FOREIGN KEY FK_FBA82B625AA1164F');
$this->addSql('DROP INDEX IDX_FBA82B625AA1164F ON sales_bundle__order');
$this->addSql('ALTER TABLE sales_bundle__order DROP payment_method_id');
$this->addSql('ALTER TABLE sales_bundle__credit_note DROP FOREIGN KEY FK_3BAC0D75AA1164F');
$this->addSql('DROP INDEX IDX_3BAC0D75AA1164F ON sales_bundle__credit_note');
$this->addSql('ALTER TABLE sales_bundle__credit_note DROP payment_method_id');
$this->addSql('ALTER TABLE sales_bundle__delivery_note DROP FOREIGN KEY FK_9CC42D75AA1164F');
$this->addSql('DROP INDEX IDX_9CC42D75AA1164F ON sales_bundle__delivery_note');
$this->addSql('ALTER TABLE sales_bundle__delivery_note DROP payment_method_id');
$this->addSql('ALTER TABLE sales_bundle__invoice DROP FOREIGN KEY FK_BB8C2B4C5AA1164F');
$this->addSql('DROP INDEX IDX_BB8C2B4C5AA1164F ON sales_bundle__invoice');
$this->addSql('ALTER TABLE sales_bundle__invoice DROP payment_method_id');
}
}