fix geom type in db: multipolygon

This commit is contained in:
Mathieu Jaumotte 2022-09-13 20:49:24 +02:00
parent 841eb57144
commit b13686bbf1

View File

@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Chill\Migrations\Main;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220913174922 extends AbstractMigration
{
public function getDescription(): string
{
return 'Geographical Unit correction';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_main_geographical_unit ALTER COLUMN geom SET DATA TYPE GEOMETRY(MULTIPOLYGON, 4326)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_main_geographical_unit ALTER COLUMN geom SET DATA TYPE TEXT');
}
}