diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2025-03-02 21:01:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-02 21:01:28 -0800 |
commit | dbed39d63292517918c3b1a74aeb71ac8910beb7 (patch) | |
tree | c8a17918505ae1e1d4d4ba228db63fa58000c37e /services | |
parent | 02657e85a4fcd31d4e6e813fddf6e0fc3bf9ec60 (diff) | |
download | gitea-dbed39d63292517918c3b1a74aeb71ac8910beb7.tar.gz gitea-dbed39d63292517918c3b1a74aeb71ac8910beb7.zip |
Add migrations and doctor fixes (#33556)
Fix #33535
Diffstat (limited to 'services')
-rw-r--r-- | services/doctor/dbconsistency.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/services/doctor/dbconsistency.go b/services/doctor/dbconsistency.go index 7cb7445148..62326ed07c 100644 --- a/services/doctor/dbconsistency.go +++ b/services/doctor/dbconsistency.go @@ -12,6 +12,7 @@ import ( issues_model "code.gitea.io/gitea/models/issues" "code.gitea.io/gitea/models/migrations" repo_model "code.gitea.io/gitea/models/repo" + secret_model "code.gitea.io/gitea/models/secret" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" ) @@ -164,6 +165,24 @@ func prepareDBConsistencyChecks() []consistencyCheck { Fixer: repo_model.DeleteOrphanedTopics, FixedMessage: "Removed", }, + { + Name: "Repository level Runners with non-zero owner_id", + Counter: actions_model.CountWrongRepoLevelRunners, + Fixer: actions_model.UpdateWrongRepoLevelRunners, + FixedMessage: "Corrected", + }, + { + Name: "Repository level Variables with non-zero owner_id", + Counter: actions_model.CountWrongRepoLevelVariables, + Fixer: actions_model.UpdateWrongRepoLevelVariables, + FixedMessage: "Corrected", + }, + { + Name: "Repository level Secrets with non-zero owner_id", + Counter: secret_model.CountWrongRepoLevelSecrets, + Fixer: secret_model.UpdateWrongRepoLevelSecrets, + FixedMessage: "Corrected", + }, } // TODO: function to recalc all counters |