]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/setup/SetupClass.php
Merge pull request #1769 from lonvia/display-name-order
[nominatim.git] / lib / setup / SetupClass.php
index 56d9f3451e02701643e67dca36706a34f432274a..385eff70eb6cda7160cb84f7a6b5c5ff0c96b08e 100755 (executable)
@@ -85,7 +85,7 @@ class SetupFunctions
         info('Create DB');
         $oDB = new \Nominatim\DB;
 
-        if ($oDB->databaseExists()) {
+        if ($oDB->checkConnection()) {
             fail('database already exists ('.CONST_Database_DSN.')');
         }
 
@@ -675,7 +675,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;
@@ -870,7 +870,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);
     }
 
     /**