Skip to content

Commit

Permalink
Fix the possible migration failure on 286 with postgres 16 (go-gitea#…
Browse files Browse the repository at this point in the history
…31209) (go-gitea#31218)

Backport go-gitea#31209 by @lunny

Try to fix go-gitea#31205

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 68e405c)
  • Loading branch information
GiteaBot authored and earl-warren committed Jun 3, 2024
1 parent 4ad7c59 commit 4e233dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/migrations/v1_22/v286.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func addObjectFormatNameToRepository(x *xorm.Engine) error {

// Here to catch weird edge-cases where column constraints above are
// not applied by the DB backend
_, err := x.Exec("UPDATE repository set object_format_name = 'sha1' WHERE object_format_name = '' or object_format_name IS NULL")
_, err := x.Exec("UPDATE `repository` set `object_format_name` = 'sha1' WHERE `object_format_name` = '' or `object_format_name` IS NULL")
return err
}

Expand Down

0 comments on commit 4e233dd

Please sign in to comment.