<?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 Version20220412234927 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 ADD leak_info_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE dark_owl ADD CONSTRAINT FK_40D58D44DBFC5247 FOREIGN KEY (leak_info_id) REFERENCES leak_info (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_40D58D44DBFC5247 ON dark_owl (leak_info_id)');
$this->addSql('ALTER TABLE leak_info CHANGE file_path file_path LONGTEXT DEFAULT NULL, CHANGE file_name file_name LONGTEXT DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE dark_owl DROP FOREIGN KEY FK_40D58D44DBFC5247');
$this->addSql('DROP INDEX UNIQ_40D58D44DBFC5247 ON dark_owl');
$this->addSql('ALTER TABLE dark_owl DROP leak_info_id');
$this->addSql('ALTER TABLE leak_info CHANGE file_path file_path VARCHAR(255) DEFAULT NULL, CHANGE file_name file_name VARCHAR(255) DEFAULT NULL');
}
}