feat: automate business upgrades and sync reviewed frontend

This commit is contained in:
Yvan
2026-11-06 15:48:35 +08:00
parent 7df74bc8e8
commit 9fccd804a3
58 changed files with 5689 additions and 259 deletions
+5 -1
View File
@@ -6,7 +6,9 @@ import (
"log/slog"
"net"
"os"
"os/signal"
"strings"
"syscall"
"kra/internal/config"
"kra/internal/data"
@@ -173,7 +175,9 @@ func main() {
if bc.Data != nil {
database = bc.Data.Database
}
if err := data.MigrateDatabase(context.Background(), database, modules.Catalog(), logger, flagCheckSchema); err != nil {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer cancel()
if err := data.MigrateDatabase(ctx, database, modules.Catalog(), logger, flagCheckSchema, runtime.ConfigPath()); err != nil {
panic(err)
}
logger.Info("database migration verification completed", "mod", "system", "check_only", flagCheckSchema)