<?php
declare(strict_types=1);
namespace CoreMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240829090531 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cx3_bundle__call ADD ticket_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', CHANGE phone_number phone_number VARCHAR(32) NOT NULL');
$this->addSql('ALTER TABLE cx3_bundle__call ADD CONSTRAINT FK_BD8CCBC1700047D2 FOREIGN KEY (ticket_id) REFERENCES tickets_bundle__ticket (id)');
$this->addSql('CREATE INDEX IDX_BD8CCBC1700047D2 ON cx3_bundle__call (ticket_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cx3_bundle__call DROP FOREIGN KEY FK_BD8CCBC1700047D2');
$this->addSql('DROP INDEX IDX_BD8CCBC1700047D2 ON cx3_bundle__call');
$this->addSql('ALTER TABLE cx3_bundle__call DROP ticket_id, CHANGE phone_number phone_number VARCHAR(10) NOT NULL');
}
}