mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Rename Sync2
-> Sync
(#26479)
The xorm `Sync2` has already been deprecated in favor of `Sync`, so let's do the same inside the Gitea codebase. Command used to replace everything: ```sh for i in $(ag Sync2 --files-with-matches); do vim $i -c ':%sno/Sync2/Sync/g' -c ':wq'; done ```
This commit is contained in:
@@ -16,7 +16,7 @@ func AddTimeStamps(x *xorm.Engine) error {
|
||||
type Star struct {
|
||||
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
||||
}
|
||||
if err := x.Sync2(new(Star)); err != nil {
|
||||
if err := x.Sync(new(Star)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ func AddTimeStamps(x *xorm.Engine) error {
|
||||
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
||||
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
|
||||
}
|
||||
if err := x.Sync2(new(Label)); err != nil {
|
||||
if err := x.Sync(new(Label)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ func AddTimeStamps(x *xorm.Engine) error {
|
||||
type Follow struct {
|
||||
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
||||
}
|
||||
if err := x.Sync2(new(Follow)); err != nil {
|
||||
if err := x.Sync(new(Follow)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ func AddTimeStamps(x *xorm.Engine) error {
|
||||
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
||||
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
|
||||
}
|
||||
if err := x.Sync2(new(Watch)); err != nil {
|
||||
if err := x.Sync(new(Watch)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -51,5 +51,5 @@ func AddTimeStamps(x *xorm.Engine) error {
|
||||
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
||||
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
|
||||
}
|
||||
return x.Sync2(new(Collaboration))
|
||||
return x.Sync(new(Collaboration))
|
||||
}
|
||||
|
Reference in New Issue
Block a user