feat: 引入版本化数据库迁移与 Schema 启动门禁
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user