aboutsummaryrefslogtreecommitdiffstats
path: root/models/migrations/v176.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-03-24 18:27:22 +0000
committerGitHub <noreply@github.com>2021-03-24 19:27:22 +0100
commit39ef6f83d50e9e641bf36342c532e8a4ad7cf3f7 (patch)
tree999a02645862d0700567a8a817232b5119fe2681 /models/migrations/v176.go
parent750ac52db2a48fb7be4a508feb527a1ffac952c6 (diff)
downloadgitea-39ef6f83d50e9e641bf36342c532e8a4ad7cf3f7.tar.gz
gitea-39ef6f83d50e9e641bf36342c532e8a4ad7cf3f7.zip
Create Proper Migration Tests (#15116)
* Create Proper Migration tests Unfortunately our testing regime has so far meant that migrations do not get proper testing. This PR begins the process of creating migration tests for this. * Add test for v176 * fix mssql drop db Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'models/migrations/v176.go')
-rw-r--r--models/migrations/v176.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/migrations/v176.go b/models/migrations/v176.go
index cec23e08f4..6436330a8d 100644
--- a/models/migrations/v176.go
+++ b/models/migrations/v176.go
@@ -8,6 +8,9 @@ import (
"xorm.io/xorm"
)
+// removeInvalidLabels looks through the database to look for comments and issue_labels
+// that refer to labels do not belong to the repository or organization that repository
+// that the issue is in
func removeInvalidLabels(x *xorm.Engine) error {
type Comment struct {
ID int64 `xorm:"pk autoincr"`