Failed to initialize ORM engine: migrate: do migrate: pq: syntax error at or near "-" #7881

Closed
opened 2025-11-02 07:40:12 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @Iced-Sun on GitHub (Sep 22, 2021).

Gitea Version

1.15.2

Git Version

No response

Operating System

No response

How are you running Gitea?

gitea helm-chart-4.1.0

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

upgrade chart-4.0.3 to chart-4.1.0, the init pod raises with

gitea-0:configure-gitea 2021/09/22 13:01:54 ...s/migrations/v179.go:19:convertAvatarURLToText() [I] [SQL] alter table gitea-fbacaae.external_login_user ALTER COLUMN avatar_url TYPE TEXT [[] - 529.538µs
gitea-0:configure-gitea 2021/09/22 13:01:54 cmd/migrate.go:38:runMigrate() [F] Failed to initialize ORM engine: migrate: do migrate: pq: syntax error at or near "-"

Seems that orm doesn't quote the schema name of gitea-fbacaae.

Screenshots

No response

Originally created by @Iced-Sun on GitHub (Sep 22, 2021). ### Gitea Version 1.15.2 ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? [gitea helm-chart](https://gitea.com/gitea/helm-chart)-4.1.0 ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description upgrade chart-4.0.3 to chart-4.1.0, the init pod raises with ``` gitea-0:configure-gitea 2021/09/22 13:01:54 ...s/migrations/v179.go:19:convertAvatarURLToText() [I] [SQL] alter table gitea-fbacaae.external_login_user ALTER COLUMN avatar_url TYPE TEXT [[] - 529.538µs gitea-0:configure-gitea 2021/09/22 13:01:54 cmd/migrate.go:38:runMigrate() [F] Failed to initialize ORM engine: migrate: do migrate: pq: syntax error at or near "-" ``` Seems that orm doesn't quote the schema name of `gitea-fbacaae`. ### Screenshots _No response_
GiteaMirror added the type/bugtype/upstream labels 2025-11-02 07:40:12 -06:00
Author
Owner

@lunny commented on GitHub (Sep 22, 2021):

This is an upstream related bug. Could you paste it to https://gitea.com/xorm/xorm/issues/new ?

P.S. As a workround, please use a schema name with no -.

@lunny commented on GitHub (Sep 22, 2021): This is an upstream related bug. Could you paste it to https://gitea.com/xorm/xorm/issues/new ? P.S. As a workround, please use a schema name with no `-`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7881