From a5d28290fbaa9b04012774d1591570b5be25e82c Mon Sep 17 00:00:00 2001 From: bcmmbaga Date: Thu, 20 Aug 2026 11:37:21 +0300 Subject: [PATCH] keep the postgres service name on the sqlite migration path --- infrastructure_files/migrate-to-enterprise.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/infrastructure_files/migrate-to-enterprise.sh b/infrastructure_files/migrate-to-enterprise.sh index 1673cb032..744ba5375 100755 --- a/infrastructure_files/migrate-to-enterprise.sh +++ b/infrastructure_files/migrate-to-enterprise.sh @@ -976,10 +976,13 @@ init_migration() { POSTGRES_DSN=$(read_required " Postgres DSN (host=… user=… password=… dbname=… port=5432 sslmode=disable)") done - # A DSN entered above names a different host, which decides what to wait on. - POSTGRES_SERVICE=$(detect_postgres_service) - if [[ -n "$POSTGRES_SERVICE" ]]; then - POSTGRES_DEPENDS_CONDITION=$(detect_postgres_depends_condition) + # Only where the operator owns Postgres: a DSN entered above may name a + # different host. The sqlite path creates its own service, nothing to find. + if [[ "$EXISTING_POSTGRES" == "yes" ]]; then + POSTGRES_SERVICE=$(detect_postgres_service) + if [[ -n "$POSTGRES_SERVICE" ]]; then + POSTGRES_DEPENDS_CONDITION=$(detect_postgres_depends_condition) + fi fi fi else