diff options
author | singuliere <35190819+singuliere@users.noreply.github.com> | 2022-05-10 02:49:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-10 02:49:01 +0200 |
commit | 443675d18072d2a345bc4644d3f52dee42f58b44 (patch) | |
tree | cecda6866f2918d8fe1fe081eb2cf2eb85a2ba0d /modules/doctor/dbconsistency.go | |
parent | [skip ci] Updated translations via Crowdin (diff) | |
download | forgejo-443675d18072d2a345bc4644d3f52dee42f58b44.tar.xz forgejo-443675d18072d2a345bc4644d3f52dee42f58b44.zip |
[doctor] Add check/fix for bogus action rows (#19656)
Signed-off-by: Loïc Dachary <loic@dachary.org>
Co-authored-by: Loïc Dachary <loic@dachary.org>
Diffstat (limited to '')
-rw-r--r-- | modules/doctor/dbconsistency.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/doctor/dbconsistency.go b/modules/doctor/dbconsistency.go index 953a05fcd1..6b5755608b 100644 --- a/modules/doctor/dbconsistency.go +++ b/modules/doctor/dbconsistency.go @@ -142,6 +142,12 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er Fixer: models.FixIssueLabelWithOutsideLabels, FixedMessage: "Removed", }, + { + Name: "Action with created_unix set as an empty string", + Counter: models.CountActionCreatedUnixString, + Fixer: models.FixActionCreatedUnixString, + FixedMessage: "Set to zero", + }, } // TODO: function to recalc all counters @@ -177,6 +183,9 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er // find access without repository genericOrphanCheck("Access entries without existing repository", "access", "repository", "access.repo_id=repository.id"), + // find action without repository + genericOrphanCheck("Action entries without existing repository", + "action", "repository", "action.repo_id=repository.id"), ) for _, c := range consistencyChecks { |