address: alter postalcode entity

This commit is contained in:
nobohan
2021-10-06 17:28:07 +02:00
parent ddbd6a9f23
commit 24320cb702
2 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
namespace Chill\Migrations\Main;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add some fields to PostalCode
*/
final class Version20211006151653 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add some fields to PostalCode';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_main_postal_code ADD refId VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE chill_main_postal_code ADD source VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE chill_main_postal_code ADD center geometry(POINT,4326) DEFAULT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_main_postal_code DROP refId');
$this->addSql('ALTER TABLE chill_main_postal_code DROP source');
$this->addSql('ALTER TABLE chill_main_postal_code DROP center');
}
}