feat: 引入版本化数据库迁移与 Schema 启动门禁

This commit is contained in:
weijuesen
2026-08-13 22:51:45 +08:00
parent 20bea001ac
commit 8b977e4164
15 changed files with 779 additions and 45 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ func main() {
os.Exit(1)
}
// 2. 连接数据库GORM 自动迁移
// 2. 连接数据库并执行版本化迁移
if err := database.Init(cfg); err != nil {
slog.Error("数据库连接失败", "err", err)
os.Exit(1)