<?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 Version20251013134938 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 config ADD company_id INT DEFAULT NULL AFTER id, CHANGE value value JSON DEFAULT NULL');
$this->addSql('ALTER TABLE config ADD CONSTRAINT FK_D48A2F7C979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)');
$this->addSql('CREATE INDEX IDX_D48A2F7C979B1AD6 ON config (company_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE config DROP FOREIGN KEY FK_D48A2F7C979B1AD6');
$this->addSql('DROP INDEX IDX_D48A2F7C979B1AD6 ON config');
$this->addSql('ALTER TABLE config DROP company_id, CHANGE value value LONGTEXT DEFAULT NULL');
}
}