feat: Restrict sqlbot version upgrades

This commit is contained in:
zhengkunwang223 2025-09-01 14:17:15 +08:00
parent 222d07175a
commit 6c7967bb38

View file

@ -1881,10 +1881,6 @@ func ignoreUpdate(installed model.AppInstall) bool {
if installed.App.Type == "php" || installed.Status == constant.StatusInstalling {
return true
}
ignores, _ := appIgnoreUpgradeRepo.List(appDetailRepo.WithAppId(installed.AppId), appIgnoreUpgradeRepo.WithScope("all"))
if len(ignores) > 0 {
return true
}
if installed.App.Key == constant.AppMysql {
majorVersion := getMajorVersion(installed.Version)
appDetails, _ := appDetailRepo.GetBy(appDetailRepo.WithAppId(installed.App.ID))
@ -1895,6 +1891,15 @@ func ignoreUpdate(installed model.AppInstall) bool {
}
return true
}
if installed.App.Key == "sqlbot" {
if common.CompareVersion("1.1.0", installed.Version) {
return true
}
}
ignores, _ := appIgnoreUpgradeRepo.List(appDetailRepo.WithAppId(installed.AppId), appIgnoreUpgradeRepo.WithScope("all"))
if len(ignores) > 0 {
return true
}
return false
}