mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
29 lines
1.1 KiB
PHP
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');
|
|
}
|
|
}
|