[优化] 数据库结构优化

This commit is contained in:
ryan
2026-06-01 15:20:43 +08:00
parent fe13db95c2
commit 9de33f7064
53 changed files with 937 additions and 596 deletions
+10
View File
@@ -32,6 +32,16 @@ func V20() Migration {
}
func migrateV20(ctx Context, db *gorm.DB, backend string) error {
if !db.Migrator().HasColumn(&nodeV20{}, "relay_frps_connections") {
if err := db.Migrator().AddColumn(&nodeV20{}, "RelayFrpsConnections"); err != nil {
return err
}
}
if !db.Migrator().HasColumn(&nodeV20{}, "relay_frps_proxy_count") {
if err := db.Migrator().AddColumn(&nodeV20{}, "RelayFrpsProxyCount"); err != nil {
return err
}
}
if err := ctx.ApplyCurrentSchema(db, backend); err != nil {
return err
}