<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240422084611 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 faq_question ADD operator_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE faq_question ADD CONSTRAINT FK_4A55B059584598A3 FOREIGN KEY (operator_id) REFERENCES operator (id) ON DELETE SET NULL');
$this->addSql('CREATE INDEX IDX_4A55B059584598A3 ON faq_question (operator_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE faq_question DROP FOREIGN KEY FK_4A55B059584598A3');
$this->addSql('DROP INDEX IDX_4A55B059584598A3 ON faq_question');
$this->addSql('ALTER TABLE faq_question DROP operator_id');
}
}