fix: Typo

This commit is contained in:
2025-11-12 17:10:18 +00:00
parent 472c7955fe
commit b2d3fdf105

View File

@@ -854,9 +854,9 @@ func (e *Engine) ensureDatabaseExists(ctx context.Context, dbName string) error
output, err = createCmd.CombinedOutput()
if err != nil {
// Log the error but don't fail - pg_restore might handle it
// Log the error and include the psql output in the returned error to aid debugging
e.log.Warn("Database creation failed", "name", dbName, "error", err, "output", string(output))
return fmt.Errorf("failed to create database '%s': %w", dbName, err)
return fmt.Errorf("failed to create database '%s': %w (output: %s)", dbName, err, strings.TrimSpace(string(output)))
}
e.log.Info("Successfully created database", "name", dbName)