ogcore/migrations/Version20260421091127.php

38 lines
1.3 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 Version20260421091127 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('DROP INDEX UNIQ_IDENTIFIER_FILENAME ON og_live');
$this->addSql('CREATE UNIQUE INDEX UNIQ_OGLIVE_FILENAME_SERVER ON og_live (filename, boot_server_id)');
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_NAME ON pxe_template');
$this->addSql('CREATE UNIQUE INDEX UNIQ_PXE_TEMPLATE_NAME_SERVER ON pxe_template (name, boot_server_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP INDEX UNIQ_PXE_TEMPLATE_NAME_SERVER ON pxe_template');
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_NAME ON pxe_template (name)');
$this->addSql('DROP INDEX UNIQ_OGLIVE_FILENAME_SERVER ON og_live');
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_FILENAME ON og_live (filename)');
}
}