fix(go): migration nodes creation failure;

This commit is contained in:
Vishal Dalwadi 2025-08-19 14:20:28 +05:30
parent 0a6bdf5ace
commit fc58ee27c6
2 changed files with 3 additions and 1 deletions

View file

@ -121,7 +121,7 @@ func initialize() { // Client Mode Prereq Check
migrate.Run()
err = migrate.ToSQLSchema()
if err != nil {
logger.FatalLog("error migrating to SQL schema: ", err.Error())
logger.FatalLog("error migrating to SQL schema:", err.Error())
}
logic.SetJWTSecret()

View file

@ -110,6 +110,8 @@ func migrateHosts(ctx context.Context) error {
}
_host := converters.ToSchemaHost(host)
// skip nodes creation, it will be done later.
_host.Nodes = []schema.Node{}
err = _host.Create(ctx)
if err != nil {
return err