mirror of
https://github.com/go-gitea/gitea
synced 2025-08-17 06:58:27 +00:00
Co-authored-by: Loïc Dachary <loic@dachary.org> Conflicts: models/consistency_test.go trivial context conflict.
This commit is contained in:
@@ -142,6 +142,12 @@ func checkDBConsistency(logger log.Logger, autofix bool) error {
|
||||
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(logger log.Logger, autofix bool) error {
|
||||
// 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 {
|
||||
|
Reference in New Issue
Block a user