chill-bundles/Resources/migrations/Version20180723133605.php
2019-05-09 09:22:56 +02:00

29 lines
1.1 KiB
PHP

<?php declare(strict_types=1);
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Add `familial_situation` to family members
*/
final class Version20180723133605 extends AbstractMigration
{
public function up(Schema $schema) : void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_amli.associated_family_member ADD familial_situation VARCHAR(200) DEFAULT NULL');
$this->addSql('ALTER TABLE chill_family.family_member ADD familial_situation VARCHAR(200) DEFAULT NULL');
}
public function down(Schema $schema) : void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_family.family_member DROP familial_situation');
$this->addSql('ALTER TABLE chill_amli.associated_family_member DROP familial_situation');
}
}