Debug: wtf
Some checks failed
Go test / run-go-vet (push) Successful in 6s
Go test / check-swagger-up-to-date (push) Successful in 9s
Go test / run-go-test (push) Successful in 20s
Go test / cleanup-go-test (push) Successful in 4s
Go test / release-image (push) Has been cancelled

This commit is contained in:
2025-12-13 02:17:46 +08:00
parent e6c46f29f5
commit fd02363da4
6 changed files with 36 additions and 14 deletions

View File

@@ -22,6 +22,22 @@ func InitDB(ctx context.Context, db *bun.DB) error {
(*models.Image)(nil),
(*models.Session)(nil),
)
} else {
modls := []any{
(*models.AliasImage)(nil),
(*models.Alias)(nil),
(*models.Image)(nil),
(*models.Session)(nil),
}
for _, model := range modls {
_, err := db.NewCreateTable().
Model(model).
IfNotExists().
Exec(ctx)
if err != nil {
return err
}
}
return nil
}
return nil
}