Commit 28925ad 1 parent 3b0bd59 commit 28925ad Copy full SHA for 28925ad
File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 9
9
"time"
10
10
11
11
"code.gitea.io/gitea/models/repo"
12
+ "code.gitea.io/gitea/modules/setting"
12
13
"code.gitea.io/gitea/modules/timeutil"
13
14
"xorm.io/xorm"
14
15
)
@@ -37,8 +38,14 @@ func addSyncOnPushColForPushMirror(x *xorm.Engine) error {
37
38
return fmt .Errorf ("sync2: %v" , err )
38
39
}
39
40
40
- if _ , err := session .Exec ("UPDATE push_mirror SET sync_on_commit = FALSE" ); err != nil {
41
- return err
41
+ if setting .Database .UsePostgreSQL { // PostgreSQL uses Boolean type
42
+ if _ , err := session .Exec ("UPDATE push_mirror SET sync_on_commit = FALSE" ); err != nil {
43
+ return err
44
+ }
45
+ } else {
46
+ if _ , err := session .Exec ("UPDATE push_mirror SET sync_on_commit = 0" ); err != nil {
47
+ return err
48
+ }
42
49
}
43
50
44
51
return session .Commit ()
You can’t perform that action at this time.
0 commit comments