Skip to content

Commit f60ac9d

Browse files
committed
Fix postgres test
1 parent f3fcec4 commit f60ac9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/index.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ func upsertResourceIndex(e Engine, tableName string, groupID int64) (err error)
2828
switch {
2929
case setting.Database.UseSQLite3 || setting.Database.UsePostgreSQL:
3030
_, err = e.Exec(fmt.Sprintf("INSERT INTO %s (group_id, max_index) "+
31-
"VALUES (?,1) ON CONFLICT (group_id) DO UPDATE SET max_index = max_index+1",
32-
tableName), groupID)
31+
"VALUES (?,1) ON CONFLICT (group_id) DO UPDATE SET max_index = %s.max_index+1",
32+
tableName, tableName), groupID)
3333
case setting.Database.UseMySQL:
3434
_, err = e.Exec(fmt.Sprintf("INSERT INTO %s (group_id, max_index) "+
3535
"VALUES (?,1) ON DUPLICATE KEY UPDATE max_index = max_index+1", tableName),

0 commit comments

Comments
 (0)