Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Upon creating the instance, only try syncing the engine version and schema if connection succeeds

天舟4fd6869936e2
diff --git a/server/instance.go b/server/instance.go
index 3a289d6181..39f8b526be 100644
--- a/server/instance.go
+++ b/server/instance.go
@@ -42,11 +42,10 @@ func (s *Server) registerInstanceRoutes(g *echo.Group) {
if err == nil {
defer db.Close(context.Background())
db.SetupMigrationIfNeeded(context.Background())
+ // Try immediately sync the engine version and schema after instance creation.
+ s.SyncEngineVersionAndSchema(instance)
}
- // Try immediately sync the engine version and schema after instance creation.
- s.SyncEngineVersionAndSchema(instance)
-
c.Response().Header().Set(echo.HeaderContentType, echo.MIMEApplicationJSONCharsetUTF8)
if err := jsonapi.MarshalPayload(c.Response().Writer, instance); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to marshal create instance response").SetInternal(err)