-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
proupgrade 报错 #3022
Copy link
Copy link
Closed
Labels
Milestone
Description
Describe the bug
日志:
$ ./cloudreve proupgrade -c /cloudreve/data/conf.ini
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/pkg/conf/conf.go:177] Override config "Database.User" = "cloudreve"
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/pkg/conf/conf.go:177] Override config "Database.Name" = "cloudreve"
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/pkg/conf/conf.go:177] Override config "Database.Port" = "5432"
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/pkg/conf/conf.go:177] Override config "Redis.Server" = "redis:6379"
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/pkg/conf/conf.go:177] Override config "Database.Type" = "postgres"
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/pkg/conf/conf.go:177] Override config "Database.Host" = "postgresql"
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/application/dependency/dependency.go:337] Logger initialized with LogLevel="info".
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/cmd/proupgrade.go:24] Upgrading from Community to Pro...
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/inventory/client.go:49] Initializing database connection...
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/inventory/client.go:80] Connect to Postgres database "postgresql".
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/application/proupgrade/proupgrade.go:20] Running database schema migration...
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/application/proupgrade/proupgrade.go:25] Database schema migration completed successfully.
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/application/proupgrade/proupgrade.go:32] Migrating share link permissions...
[Info] 2025-11-09 22:33:51 [/home/vsts/work/1/s/application/proupgrade/proupgrade.go:62] Migrating group storage policy edges...
[Error] 2025-11-09 22:33:51 [/home/vsts/work/1/s/cmd/proupgrade.go:27] Failed to upgrade to Pro: failed to query groups: pq: syntax error at or near "`"
$ docker compose logs -f postgresql
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-09 14:33:25.043 UTC [1] LOG: starting PostgreSQL 17.6 (Debian 17.6-2.pgdg13+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2025-11-09 14:33:25.043 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-11-09 14:33:25.043 UTC [1] LOG: listening on IPv6 address "::", port 5432
2025-11-09 14:33:25.043 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-11-09 14:33:25.045 UTC [29] LOG: database system was shut down at 2025-11-09 14:33:24 UTC
2025-11-09 14:33:25.048 UTC [1] LOG: database system is ready to accept connections
2025-11-09 14:33:51.720 UTC [39] ERROR: syntax error at or near "`" at character 99
2025-11-09 14:33:51.720 UTC [39] STATEMENT: INSERT INTO group_storage_policies (group_id, storage_policy_id)SELECT id, storage_policy_id FROM `groups` WHERE storage_policy_id IS NOT NULL
To Reproduce
- 安装 4.9.2
- 按文档升级到 pro
- proupgrade 命令报错
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Reactions are currently unavailable