Fixed: take layer into account for unicity of geographical unit's keys

This commit is contained in:
2022-10-03 17:19:11 +02:00
parent 9c3ac72426
commit 65f6712a15
3 changed files with 13 additions and 13 deletions

View File

@@ -17,8 +17,8 @@ final class Version20221003132620 extends AbstractMigration
public function up(Schema $schema): void
{
$this->addSql('CREATE UNIQUE INDEX geographical_unit_layer_refid ON chill_main_geographical_unit_layer (refId)');
$this->addSql('CREATE UNIQUE INDEX geographical_unit_refid ON chill_main_geographical_unit (unitRefId)');
$this->addSql('CREATE INDEX chill_internal_geographical_unit_layer_geom_idx ON chill_main_geographical_unit USING GIST (geom)');
$this->addSql('CREATE UNIQUE INDEX geographical_unit_refid ON chill_main_geographical_unit (layer_id, unitRefId)');
$this->addSql('CREATE INDEX chill_internal_geographical_unit_layer_geom_idx ON chill_main_geographical_unit USING GIST (layer_id, geom)');
}
public function down(Schema $schema): void