<?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 Version20220518200325 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 exposed_sub_domain ADD exposed_ip_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE exposed_sub_domain ADD CONSTRAINT FK_9CEC6A075539FF52 FOREIGN KEY (exposed_ip_id) REFERENCES exposed_ip (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_9CEC6A075539FF52 ON exposed_sub_domain (exposed_ip_id)');
$this->addSql('ALTER TABLE leaked_password CHANGE source source VARCHAR(255) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE exposed_sub_domain DROP FOREIGN KEY FK_9CEC6A075539FF52');
$this->addSql('DROP INDEX UNIQ_9CEC6A075539FF52 ON exposed_sub_domain');
$this->addSql('ALTER TABLE exposed_sub_domain DROP exposed_ip_id');
$this->addSql('ALTER TABLE leaked_password CHANGE source source VARCHAR(255) DEFAULT NULL');
}
}