Add commit status summary table to reduce query from commit status table (#30223)

This PR adds a new table named commit status summary to reduce queries
from the commit status table. After this change, commit status summary
table will be used for the final result, commit status table will be for
details.

---------

Co-authored-by: Jason Song <i@wolfogre.com>
This commit is contained in:
Lunny Xiao 2024-04-12 09:41:50 +08:00 committed by Michael Kriese
parent 5a10eec50f
commit 6495741238
No known key found for this signature in database
GPG key ID: F8D7748549A5986A
6 changed files with 162 additions and 19 deletions

View file

@ -578,7 +578,10 @@ var migrations = []Migration{
// Gitea 1.22.0 ends at 294
// v294 -> v295
NewMigration("Add unique index for project issue table", v1_23.AddUniqueIndexForProjectIssue),
// v295 -> v296
NewMigration("Add commit status summary table", v1_23.AddCommitStatusSummary),
}
// GetCurrentDBVersion returns the current db version