<?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 Version20200428094419 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE channel_settings ADD strength_point_setting_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE channel_settings ADD CONSTRAINT FK_92F5D36CEE364BBD FOREIGN KEY (strength_point_setting_id) REFERENCES strength_point_setting (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_92F5D36CEE364BBD ON channel_settings (strength_point_setting_id)');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE channel_settings DROP CONSTRAINT FK_92F5D36CEE364BBD');
$this->addSql('DROP INDEX IDX_92F5D36CEE364BBD');
$this->addSql('ALTER TABLE channel_settings DROP strength_point_setting_id');
}
}