Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(config): Remove managed database validation
Catch the unauthenticated error from the service instead.
  • Loading branch information
kyleconroy committed Oct 23, 2023
commit 2321467c12f7d2935c6eab4045c470a9bb8024fb
8 changes: 0 additions & 8 deletions internal/config/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ func Validate(c *Config) error {
if sql.Database.URI == "" && !sql.Database.Managed {
return ErrInvalidDatabase
}
if sql.Database.Managed {
if c.Cloud.Project == "" {
return ErrManagedDatabaseNoProject
}
if c.Cloud.AuthToken == "" {
return ErrManagedDatabaseNoAuthToken
}
}
}
}
return nil
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
version: "2"
cloud:
project: "01HAQMMECEYQYKFJN8MP16QC41"
sql:
- engine: "postgresql"
schema: "schema.sql"
Expand All @@ -10,5 +8,3 @@ sql:
package: "querytest"
out: "go"
sql_package: "pgx/v5"
database:
managed: true