We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e473435 commit fcf179bCopy full SHA for fcf179b
models/migrations/v1_24/v320.go
@@ -13,7 +13,13 @@ func MigrateSkipTwoFactor(x *xorm.Engine) error {
13
type LoginSource struct {
14
TwoFactorPolicy string `xorm:"two_factor_policy NOT NULL DEFAULT ''"`
15
}
16
- err := x.Sync(new(LoginSource))
+ _, err := x.SyncWithOptions(
17
+ xorm.SyncOptions{
18
+ IgnoreConstrains: true,
19
+ IgnoreIndices: true,
20
+ },
21
+ new(LoginSource),
22
+ )
23
if err != nil {
24
return err
25
0 commit comments