<?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 Version20211208152527 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_9F8C0079D1AA2FC1');
$this->addSql('DROP INDEX IDX_9F8C0079D1AA2FC1 ON checks');
$this->addSql('ALTER TABLE checks ADD registrar LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', DROP 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 ADD registrar_id INT DEFAULT NULL, DROP registrar');
$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)');
}
}