mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-24 02:36:10 +01:00
e8c1bfc2e5
- This also means that if one of the test fails, it will actually propagate to make and subsequently fail the test. - Remove the 'delete duplicates issue users' code, I checked this against my local development database (which contains quite bizarre cases, even some that Forgejo does not like), my local instance database and against Codeberg production and they all yielded no results to this query, so I'm removing it thus resolving the error that the delete code was not compatible with Mysql. - Sync all tables that are requires by the migration in the test. - Resolves #2206 (cherry picked from commit8e02be7e89
) (cherry picked from commit006f064416
)
18 lines
376 B
Go
18 lines
376 B
Go
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_22 //nolint
|
|
|
|
import (
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func AddCombinedIndexToIssueUser(x *xorm.Engine) error {
|
|
type IssueUser struct {
|
|
UID int64 `xorm:"INDEX unique(uid_to_issue)"` // User ID.
|
|
IssueID int64 `xorm:"INDEX unique(uid_to_issue)"`
|
|
}
|
|
|
|
return x.Sync(&IssueUser{})
|
|
}
|