<?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 Version20240624074853 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE request ADD site_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE request ADD CONSTRAINT FK_3B978F9FF6BD1646 FOREIGN KEY (site_id) REFERENCES sites (id)');
$this->addSql('CREATE INDEX IDX_3B978F9FF6BD1646 ON request (site_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE request DROP FOREIGN KEY FK_3B978F9FF6BD1646');
$this->addSql('DROP INDEX IDX_3B978F9FF6BD1646 ON request');
$this->addSql('ALTER TABLE request DROP site_id');
}
}