X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/553d8a828cdbb12fa4b544d511e78bf587838157..38c21de0ee17bb0eacd6cc8f0e1ed71cbee0b0c9:/lib/setup/SetupClass.php diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php index ac0f8f02..7c1c628e 100755 --- a/lib/setup/SetupClass.php +++ b/lib/setup/SetupClass.php @@ -84,7 +84,7 @@ class SetupFunctions info('Create DB'); $oDB = new \Nominatim\DB; - if ($oDB->databaseExists()) { + if ($oDB->checkConnection()) { fail('database already exists ('.CONST_Database_DSN.')'); } @@ -651,7 +651,7 @@ class SetupFunctions ); $aDropTables = array(); - $aHaveTables = $this->oDB->getCol("SELECT tablename FROM pg_tables WHERE schemaname='public'"); + $aHaveTables = $this->oDB->getListOfTables(); foreach ($aHaveTables as $sTable) { $bFound = false; @@ -858,7 +858,7 @@ class SetupFunctions private function dropTable($sName) { if ($this->bVerbose) echo "Dropping table $sName\n"; - $this->oDB->exec('DROP TABLE IF EXISTS '.$sName.' CASCADE'); + $this->oDB->deleteTable($sName); } /**