public function onSchemaDropTable(SchemaDropTableEventArgs $args)
{
if ($this->schemaManager->isPostGis2()) {
return;
}
$table = $args->getTable();
$hasSpatialGeometryColumn = count($this->schemaManager->listSpatialGeometryColumns($table->getName())) > 0;
if ($hasSpatialGeometryColumn) {
$args->setSql("SELECT DropGeometryTable('" . $table->getName() . "')")->preventDefault();
}
}