<?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 Version20211207134533 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 registrars DROP FOREIGN KEY FK_6824AEAF92F3E70');
$this->addSql('DROP INDEX uniq_6824aea5e237e06 ON registrars');
$this->addSql('CREATE UNIQUE INDEX UNIQ_1E00923E5E237E06 ON registrars (name)');
$this->addSql('DROP INDEX uniq_6824aea4fbf094f ON registrars');
$this->addSql('CREATE UNIQUE INDEX UNIQ_1E00923E4FBF094F ON registrars (company)');
$this->addSql('DROP INDEX idx_6824aeaf92f3e70 ON registrars');
$this->addSql('CREATE INDEX IDX_1E00923EF92F3E70 ON registrars (country_id)');
$this->addSql('ALTER TABLE registrars ADD CONSTRAINT FK_6824AEAF92F3E70 FOREIGN KEY (country_id) REFERENCES countries (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE registrars DROP FOREIGN KEY FK_1E00923EF92F3E70');
$this->addSql('DROP INDEX idx_1e00923ef92f3e70 ON registrars');
$this->addSql('CREATE INDEX IDX_6824AEAF92F3E70 ON registrars (country_id)');
$this->addSql('DROP INDEX uniq_1e00923e5e237e06 ON registrars');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6824AEA5E237E06 ON registrars (name)');
$this->addSql('DROP INDEX uniq_1e00923e4fbf094f ON registrars');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6824AEA4FBF094F ON registrars (company)');
$this->addSql('ALTER TABLE registrars ADD CONSTRAINT FK_1E00923EF92F3E70 FOREIGN KEY (country_id) REFERENCES countries (id)');
}
}