diff --git a/migrations/kdvh/db/main.go b/migrations/kdvh/db/main.go index d2fe9445..698d4068 100644 --- a/migrations/kdvh/db/main.go +++ b/migrations/kdvh/db/main.go @@ -1,6 +1,6 @@ package db -const KDVH_ENV_VAR string = "KDVH_PROXY_CONN" +const KDVH_ENV_VAR string = "KDVH_PROXY_CONN_STRING" // Map of all tables found in KDVH, with set max import year type KDVH struct { diff --git a/migrations/lard/main.go b/migrations/lard/main.go index 435c2ad0..82e2bbce 100644 --- a/migrations/lard/main.go +++ b/migrations/lard/main.go @@ -2,7 +2,7 @@ package lard import "time" -const LARD_ENV_VAR string = "LARD_STRING" +const LARD_ENV_VAR string = "LARD_CONN_STRING" // Struct mimicking the `public.data` table type DataObs struct { diff --git a/migrations/lard/permissions.go b/migrations/lard/permissions.go index ebd4099d..b0b7df5e 100644 --- a/migrations/lard/permissions.go +++ b/migrations/lard/permissions.go @@ -9,7 +9,7 @@ import ( "github.com/jackc/pgx/v5" ) -const STINFO_ENV_VAR string = "STINFO_STRING" +const STINFO_ENV_VAR string = "STINFO_CONN_STRING" type StationId = int32 type PermitId = int32 diff --git a/migrations/main.go b/migrations/main.go index 804a40b9..59d4790c 100644 --- a/migrations/main.go +++ b/migrations/main.go @@ -20,14 +20,16 @@ type CmdArgs struct { func main() { log.SetFlags(log.LstdFlags | log.Lshortfile) - // The following env variables are needed: + // The following env variables are required: // 1. Dump - // - kdvh: "KDVH_PROXY_CONN" + // - kdvh: "KDVH_CONN_STRING" // - kvalobs: "KVALOBS_CONN_STRING", "HISTKVALOBS_CONN_STRING" // // 2. Import - // - kdvh: "LARD_STRING", "STINFO_STRING", "KDVH_PROXY_CONN" - // - kvalobs: "LARD_STRING", "STINFO_STRING" + // - kdvh: "LARD_CONN_STRING", "STINFO_CONN_STRING", "KDVH_CONN_STRING" + // - kvalobs: "LARD_CONN_STRING", "STINFO_CONN_STRING", "KVALOBS_CONN_STRING" + // + // NOTE: KDVH_CONN_STRING refers to the proxy err := godotenv.Load() if err != nil { fmt.Println(err)