<?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 Version20211207142208 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 checks DROP FOREIGN KEY FK_9F8C0079BCF66DBE');
$this->addSql('DROP INDEX IDX_9F8C0079BCF66DBE ON checks');
$this->addSql('ALTER TABLE checks CHANGE registar_id registrar_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE checks ADD CONSTRAINT FK_9F8C0079D1AA2FC1 FOREIGN KEY (registrar_id) REFERENCES registrars (id)');
$this->addSql('CREATE INDEX IDX_9F8C0079D1AA2FC1 ON checks (registrar_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE checks DROP FOREIGN KEY FK_9F8C0079D1AA2FC1');
$this->addSql('DROP INDEX IDX_9F8C0079D1AA2FC1 ON checks');
$this->addSql('ALTER TABLE checks CHANGE registrar_id registar_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE checks ADD CONSTRAINT FK_9F8C0079BCF66DBE FOREIGN KEY (registar_id) REFERENCES registrars (id)');
$this->addSql('CREATE INDEX IDX_9F8C0079BCF66DBE ON checks (registar_id)');
}
}