]> source.dussan.org Git - gitea.git/commitdiff
Fix the possible migration failure on 286 with postgres 16 (#31209) (#31218)
authorGiteabot <teabot@gitea.io>
Sun, 2 Jun 2024 07:19:30 +0000 (15:19 +0800)
committerGitHub <noreply@github.com>
Sun, 2 Jun 2024 07:19:30 +0000 (10:19 +0300)
Backport #31209 by @lunny

Try to fix #31205

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
models/migrations/v1_22/v286.go

index e11d16f8de335cf177f70c7df2c847ced318da2e..6ad669f27cc09c10059b6e3641fa4c532bfcbbac 100644 (file)
@@ -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
 }