ogcore/migrations/Version20241120050107.php

36 lines
1.1 KiB
PHP

<?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 Version20241120050107 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 trace DROP FOREIGN KEY FK_315BD5A133E1689A');
$this->addSql('DROP INDEX IDX_315BD5A133E1689A ON trace');
$this->addSql('ALTER TABLE trace ADD command VARCHAR(255) DEFAULT NULL, DROP command_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE trace ADD command_id INT NOT NULL, DROP command');
$this->addSql('ALTER TABLE trace ADD CONSTRAINT FK_315BD5A133E1689A FOREIGN KEY (command_id) REFERENCES command (id)');
$this->addSql('CREATE INDEX IDX_315BD5A133E1689A ON trace (command_id)');
}
}