Skip to content

Commit 4be55bd

Browse files
authored
feat(config): Remove managed database validation (#2901)
Catch the unauthenticated error from the service instead.
1 parent b891a04 commit 4be55bd

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

internal/config/validate.go

-8
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ func Validate(c *Config) error {
66
if sql.Database.URI == "" && !sql.Database.Managed {
77
return ErrInvalidDatabase
88
}
9-
if sql.Database.Managed {
10-
if c.Cloud.Project == "" {
11-
return ErrManagedDatabaseNoProject
12-
}
13-
if c.Cloud.AuthToken == "" {
14-
return ErrManagedDatabaseNoAuthToken
15-
}
16-
}
179
}
1810
}
1911
return nil
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
version: "2"
2-
cloud:
3-
project: "01HAQMMECEYQYKFJN8MP16QC41"
42
sql:
53
- engine: "postgresql"
64
schema: "schema.sql"
@@ -10,5 +8,3 @@ sql:
108
package: "querytest"
119
out: "go"
1210
sql_package: "pgx/v5"
13-
database:
14-
managed: true

0 commit comments

Comments
 (0)