diff options
Diffstat (limited to 'models/migrations/v1_24/v318.go')
-rw-r--r-- | models/migrations/v1_24/v318.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/models/migrations/v1_24/v318.go b/models/migrations/v1_24/v318.go index 83fb0061d3..9b4a540960 100644 --- a/models/migrations/v1_24/v318.go +++ b/models/migrations/v1_24/v318.go @@ -1,7 +1,7 @@ // Copyright 2025 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_24 //nolint +package v1_24 import ( "code.gitea.io/gitea/models/perm" @@ -13,5 +13,9 @@ func AddRepoUnitAnonymousAccessMode(x *xorm.Engine) error { type RepoUnit struct { //revive:disable-line:exported AnonymousAccessMode perm.AccessMode `xorm:"NOT NULL DEFAULT 0"` } - return x.Sync(&RepoUnit{}) + _, err := x.SyncWithOptions(xorm.SyncOptions{ + IgnoreConstrains: true, + IgnoreIndices: true, + }, new(RepoUnit)) + return err } |