diff options
Diffstat (limited to 'models/migrations/v1_24/v319.go')
-rw-r--r-- | models/migrations/v1_24/v319.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/models/migrations/v1_24/v319.go b/models/migrations/v1_24/v319.go index 6983c38605..648081f74e 100644 --- a/models/migrations/v1_24/v319.go +++ b/models/migrations/v1_24/v319.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 ( "xorm.io/xorm" @@ -11,6 +11,9 @@ func AddExclusiveOrderColumnToLabelTable(x *xorm.Engine) error { type Label struct { ExclusiveOrder int `xorm:"DEFAULT 0"` } - - return x.Sync(new(Label)) + _, err := x.SyncWithOptions(xorm.SyncOptions{ + IgnoreConstrains: true, + IgnoreIndices: true, + }, new(Label)) + return err } |