<?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 Version20220412010628 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 dark_owl CHANGE title title VARCHAR(255) DEFAULT NULL, CHANGE url url LONGTEXT NOT NULL');
$this->addSql('ALTER TABLE leak_email DROP FOREIGN KEY FK_773DC112DBFC5247');
$this->addSql('DROP INDEX IDX_773DC112DBFC5247 ON leak_email');
$this->addSql('ALTER TABLE leak_email CHANGE leak_info_id dark_owl_id INT NOT NULL');
$this->addSql('ALTER TABLE leak_email ADD CONSTRAINT FK_773DC11269462031 FOREIGN KEY (dark_owl_id) REFERENCES dark_owl (id)');
$this->addSql('CREATE INDEX IDX_773DC11269462031 ON leak_email (dark_owl_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE dark_owl CHANGE title title VARCHAR(255) NOT NULL, CHANGE url url VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE leak_email DROP FOREIGN KEY FK_773DC11269462031');
$this->addSql('DROP INDEX IDX_773DC11269462031 ON leak_email');
$this->addSql('ALTER TABLE leak_email CHANGE dark_owl_id leak_info_id INT NOT NULL');
$this->addSql('ALTER TABLE leak_email ADD CONSTRAINT FK_773DC112DBFC5247 FOREIGN KEY (leak_info_id) REFERENCES leak_info (id)');
$this->addSql('CREATE INDEX IDX_773DC112DBFC5247 ON leak_email (leak_info_id)');
}
}