From 91a4abc62d3cd8bf08ccc3de290a8f15d41b83fe Mon Sep 17 00:00:00 2001 From: steebchen Date: Mon, 25 Dec 2023 01:41:00 +0700 Subject: [PATCH] fix(engine): adapt datasource handling --- engine/lifecycle.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/engine/lifecycle.go b/engine/lifecycle.go index 9fdd4062..9081c1ff 100644 --- a/engine/lifecycle.go +++ b/engine/lifecycle.go @@ -5,7 +5,6 @@ import ( "encoding/base64" "encoding/json" "fmt" - "log" "os" "os/exec" "path" @@ -202,18 +201,7 @@ func (e *QueryEngine) GetEncodedDatasources() (string, error) { } for i := range datasources { - if env := datasources[i].URL.FromEnvVar; env != "" { - url := os.Getenv(env) - if url == "" { - log.Printf("WARNING: env var %s which was defined in the Prisma schema is not set", env) - continue - // return "", fmt.Errorf("env var %s which was defined in the Prisma schema is not set", env) - } - overrides = append(overrides, DatasourceOverride{ - Name: datasources[i].Name.String(), - URL: url, - }) - } else { + if val := datasources[i].URL.Value; val != "" { overrides = append(overrides, DatasourceOverride{ Name: datasources[i].Name.String(), URL: e.datasourceURL,