<?php
declare(strict_types=1);
namespace SuppliersBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20241017140129 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE suppliers_bundle__supplier ADD sales_context_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE suppliers_bundle__supplier ADD CONSTRAINT FK_DC54A5DA6B00C1CF FOREIGN KEY (sales_context_id) REFERENCES context (id)');
$this->addSql('CREATE INDEX IDX_DC54A5DA643C76A3 ON suppliers_bundle__supplier (sales_context_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE suppliers_bundle__supplier DROP FOREIGN KEY FK_DC54A5DA6B00C1CF');
$this->addSql('DROP INDEX IDX_DC54A5DA643C76A3 ON suppliers_bundle__supplier');
$this->addSql('ALTER TABLE suppliers_bundle__supplier DROP sales_context_id');
}
}