<?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 Version20200325105642 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('DROP TABLE user_settings');
}
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 user_settings DROP CONSTRAINT FK_5C844C5A76ED395');
$this->addSql('ALTER TABLE user_settings DROP CONSTRAINT FK_5C844C5F28BBC1C');
$this->addSql('DROP INDEX UNIQ_5C844C5A76ED395');
$this->addSql('DROP INDEX UNIQ_5C844C5F28BBC1C');
$this->addSql('ALTER TABLE user_settings ALTER user_id TYPE VARCHAR(255)');
$this->addSql('ALTER TABLE user_settings ALTER user_id DROP DEFAULT');
$this->addSql('ALTER TABLE user_settings ALTER standard_recipe_id TYPE VARCHAR(255)');
$this->addSql('ALTER TABLE user_settings ALTER standard_recipe_id DROP DEFAULT');
}
}