]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/clicmd/setup.py
automatic migration from 3.6 release
[nominatim.git] / nominatim / clicmd / setup.py
index 662bc8ceb3f462627be88759a884f3ebc41919d3..71980739756c2e0f3a885689e3ad547e6ae1e6e7 100644 (file)
@@ -126,10 +126,12 @@ class SetupAll:
             indexer.index_full(analyse=not args.index_noanalyse)
 
         LOG.warning('Post-process tables')
-        params = ['setup.php', '--create-search-indices', '--create-country-names']
-        if args.no_updates:
-            params.append('--drop')
-        run_legacy_script(*params, nominatim_env=args, throw_on_fail=not args.ignore_errors)
+        with connect(args.config.get_libpq_dsn()) as conn:
+            database_import.create_search_indices(conn, args.config,
+                                                  args.sqllib_dir,
+                                                  drop=args.no_updates)
+        run_legacy_script('setup.php', '--create-country-names',
+                          nominatim_env=args, throw_on_fail=not args.ignore_errors)
 
         webdir = args.project_dir / 'website'
         LOG.warning('Setup website at %s', webdir)