<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20200529112028 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE hoard ADD redirect_to_hoard INT DEFAULT NULL');
$this->addSql('ALTER TABLE hoard_audit ADD redirect_to_hoard INT DEFAULT NULL');
$this->addSql('ALTER TABLE reference ADD redirect_to_reference INT DEFAULT NULL');
$this->addSql('ALTER TABLE reference_audit ADD redirect_to_reference INT DEFAULT NULL');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE hoard DROP redirect_to_hoard');
$this->addSql('ALTER TABLE hoard_audit DROP redirect_to_hoard');
$this->addSql('ALTER TABLE reference DROP redirect_to_reference');
$this->addSql('ALTER TABLE reference_audit DROP redirect_to_reference');
}
}