<?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 Version20230117091344 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE sales_bundle__order_line ADD canceled_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD canceled_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE sales_bundle__order_line ADD CONSTRAINT FK_38D3FC511418957 FOREIGN KEY (canceled_by_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_38D3FC511418957 ON sales_bundle__order_line (canceled_by_id)');
$this->addSql('CREATE INDEX canceled_at ON sales_bundle__order_line (canceled_at)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE sales_bundle__order_line DROP FOREIGN KEY FK_38D3FC511418957');
$this->addSql('DROP INDEX IDX_38D3FC511418957 ON sales_bundle__order_line');
$this->addSql('DROP INDEX canceled_at ON sales_bundle__order_line');
$this->addSql('ALTER TABLE sales_bundle__order_line DROP canceled_by_id, DROP canceled_at');
}
}