mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Explicitly not update indexes when sync database schemas (#34281)
Fix #34275 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -17,5 +17,9 @@ func (pullAutoMerge) TableName() string {
|
||||
}
|
||||
|
||||
func AddDeleteBranchAfterMergeForAutoMerge(x *xorm.Engine) error {
|
||||
return x.Sync(new(pullAutoMerge))
|
||||
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
||||
IgnoreConstrains: true,
|
||||
IgnoreIndices: true,
|
||||
}, new(pullAutoMerge))
|
||||
return err
|
||||
}
|
||||
|
@@ -11,6 +11,9 @@ func AddEphemeralToActionRunner(x *xorm.Engine) error {
|
||||
type ActionRunner struct {
|
||||
Ephemeral bool `xorm:"ephemeral NOT NULL DEFAULT false"`
|
||||
}
|
||||
|
||||
return x.Sync(new(ActionRunner))
|
||||
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
||||
IgnoreConstrains: true,
|
||||
IgnoreIndices: true,
|
||||
}, new(ActionRunner))
|
||||
return err
|
||||
}
|
||||
|
@@ -16,5 +16,9 @@ func AddDescriptionForSecretsAndVariables(x *xorm.Engine) error {
|
||||
Description string `xorm:"TEXT"`
|
||||
}
|
||||
|
||||
return x.Sync(new(Secret), new(ActionVariable))
|
||||
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
||||
IgnoreConstrains: true,
|
||||
IgnoreIndices: true,
|
||||
}, new(Secret), new(ActionVariable))
|
||||
return err
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user