<?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 Version20200416140116 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 users ADD phone TEXT DEFAULT NULL');
$this->addSql('ALTER TABLE users ADD surname TEXT DEFAULT NULL');
$this->addSql('ALTER TABLE users ADD first_name TEXT DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN users.phone IS \'Phone.\'');
$this->addSql('COMMENT ON COLUMN users.surname IS \'Surname.\'');
$this->addSql('COMMENT ON COLUMN users.first_name IS \'First name.\'');
}
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 users DROP phone');
$this->addSql('ALTER TABLE users DROP surname');
$this->addSql('ALTER TABLE users DROP first_name');
}
}