aboutsummaryrefslogtreecommitdiffstats
path: root/models/migrations/v1_23/v300.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrations/v1_23/v300.go')
-rw-r--r--models/migrations/v1_23/v300.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/models/migrations/v1_23/v300.go b/models/migrations/v1_23/v300.go
index f1f1cccdbf..51de43da5e 100644
--- a/models/migrations/v1_23/v300.go
+++ b/models/migrations/v1_23/v300.go
@@ -13,5 +13,9 @@ func AddForcePushBranchProtection(x *xorm.Engine) error {
ForcePushAllowlistTeamIDs []int64 `xorm:"JSON TEXT"`
ForcePushAllowlistDeployKeys bool `xorm:"NOT NULL DEFAULT false"`
}
- return x.Sync(new(ProtectedBranch))
+ _, err := x.SyncWithOptions(xorm.SyncOptions{
+ IgnoreConstrains: true,
+ IgnoreIndices: true,
+ }, new(ProtectedBranch))
+ return err
}