<?php
declare(strict_types=1);
namespace CoreMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240424182952 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 webservice_key ADD context_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE webservice_key ADD CONSTRAINT FK_4AEB92AA6B00C1CF FOREIGN KEY (context_id) REFERENCES context (id)');
$this->addSql('CREATE INDEX IDX_4AEB92AA6B00C1CF ON webservice_key (context_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE webservice_key DROP FOREIGN KEY FK_4AEB92AA6B00C1CF');
$this->addSql('DROP INDEX IDX_4AEB92AA6B00C1CF ON webservice_key');
$this->addSql('ALTER TABLE webservice_key DROP context_id');
}
}