<?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 Version20220503170948 extends AbstractMigration
{
public function getDescription(): string
{
return 'Key';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE clef ADD CONSTRAINT FK_F541EE3A1835B3FC FOREIGN KEY (idmaster_clef) REFERENCES clef (idclef) ON DELETE SET NULL');
$this->addSql('CREATE INDEX IDX_F541EE3A1835B3FC ON clef (idmaster_clef)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE clef DROP FOREIGN KEY FK_F541EE3A1835B3FC');
$this->addSql('DROP INDEX IDX_F541EE3A1835B3FC ON clef');
}
}