Fix the possible migration failure on 286 with postgres 16 (#31209)

Try to fix #31205

(cherry picked from commit 98a61040b1c83790b0e0e977188842f967ae357e)
This commit is contained in:
Lunny Xiao 2024-06-02 11:01:08 +08:00 committed by Earl Warren
parent 737c3e90eb
commit f6e2b79dd8
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -60,7 +60,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
}