fix: repair healthz mysql check and im tenant creation
- healthz: Scan(new(int)) is not supported by GoFrame, use .One() so the mysql check no longer reports a false failure - im_tenant: set updated_by on insert for both im_tenant and im_tenant_config, otherwise new tenant creation fails with "Field 'updated_by' doesn't have a default value" - gitignore: exclude .trae/ local debugging artifacts
This commit is contained in:
@@ -30,7 +30,7 @@ func Serve(r *ghttp.Request) {
|
||||
checks := map[string]string{}
|
||||
statusCode := http.StatusOK
|
||||
|
||||
if err := g.DB().Ctx(ctx).Raw("SELECT 1").Scan(new(int)); err != nil {
|
||||
if _, err := g.DB().Ctx(ctx).Raw("SELECT 1").One(); err != nil {
|
||||
checks["mysql"] = err.Error()
|
||||
statusCode = http.StatusServiceUnavailable
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user