From 573fba55af5185e0d6113a062628043d2c87bc76 Mon Sep 17 00:00:00 2001 From: marc tobias Date: Mon, 2 Sep 2019 01:03:28 +0200 Subject: [PATCH] SetupClass: on --drop check if table exists first --- lib/setup/SetupClass.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php index b6705968..48955248 100755 --- a/lib/setup/SetupClass.php +++ b/lib/setup/SetupClass.php @@ -725,9 +725,7 @@ class SetupFunctions } foreach ($aDropTables as $sDrop) { if ($this->bVerbose) echo "Dropping table $sDrop\n"; - $this->oDB->exec("DROP TABLE $sDrop CASCADE"); - // ignore warnings/errors as they might be caused by a table having - // been deleted already by CASCADE + $this->oDB->exec("DROP TABLE IF EXISTS $sDrop CASCADE"); } if (!is_null(CONST_Osm2pgsql_Flatnode_File) && CONST_Osm2pgsql_Flatnode_File) { -- 2.43.2