<?php
declare(strict_types=1);
namespace TicketsBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20240716144506 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql(
'ALTER TABLE tickets_bundle__ticket ADD customer_id BINARY(16)
DEFAULT NULL COMMENT \'(DC2Type:uuid)\''
);
$this->addSql(
'ALTER TABLE tickets_bundle__ticket ADD CONSTRAINT FK_F69B6D729395C3F3
FOREIGN KEY (customer_id) REFERENCES customers_bundle__customer (id)'
);
$this->addSql('CREATE INDEX IDX_F69B6D729395C3F3 ON tickets_bundle__ticket (customer_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE tickets_bundle__ticket DROP FOREIGN KEY FK_F69B6D729395C3F3');
$this->addSql('DROP INDEX IDX_F69B6D729395C3F3 ON tickets_bundle__ticket');
$this->addSql('ALTER TABLE tickets_bundle__ticket DROP customer_id');
}
}