diff --git a/python/plugins/db_manager/db_plugins/gpkg/connector.py b/python/plugins/db_manager/db_plugins/gpkg/connector.py index 1c05592d6678..77de9a3f7606 100644 --- a/python/plugins/db_manager/db_plugins/gpkg/connector.py +++ b/python/plugins/db_manager/db_plugins/gpkg/connector.py @@ -587,7 +587,9 @@ def createTable(self, table, field_defs, pkey): def deleteTable(self, table): """Deletes table from the database """ if self.isRasterTable(table): - return False + sql = "DROP TABLE {}".format(self.quoteId(table)) + self._execute_and_commit(sql) + return True _, tablename = self.getSchemaTableName(table) for i in range(self.gdal_ds.GetLayerCount()):