We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62639ae commit 9970824Copy full SHA for 9970824
1 file changed
cmd/plan/plan.go
@@ -209,6 +209,10 @@ func CreateDesiredStateProvider(config *PlanConfig) (postgres.DesiredStateProvid
209
// CreateEmbeddedPostgresForPlan creates a temporary embedded PostgreSQL instance
210
// for validating the desired state schema. The instance should be stopped by the caller.
211
func CreateEmbeddedPostgresForPlan(config *PlanConfig, pgVersion postgres.PostgresVersion) (*postgres.EmbeddedPostgres, error) {
212
+ if config.User == "" {
213
+ return nil, fmt.Errorf("target database user must not be empty when creating embedded postgres")
214
+ }
215
+
216
// Start embedded PostgreSQL with matching version.
217
// Use the target database username so that role references match between
218
// the desired state (embedded) and current state (target database).
0 commit comments