Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore command fails when using PostgreSQL #514

Closed
ciur opened this issue Feb 4, 2023 · 1 comment
Closed

Restore command fails when using PostgreSQL #514

ciur opened this issue Feb 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ciur
Copy link
Owner

ciur commented Feb 4, 2023

Backend version: 2.1.5

When running "restore" command and DB is PostgreSQL, restore fails with "ERROR: recursive query "tree" column [...] has type varchar(200) in non-recursive term but type character varying overall":

docker compose --env-file env.docker-compose run backend restore /backup/backup_04_02_2023-08_30_51.tar.gz

In order to fix the problem, SQL column needs to be casted to correct type. Note the ANSI SQL compatible syntax (x::type, is PostgreSQL specific syntax, while CAST(x as type) is ANSI SQL).

@ciur ciur added the bug Something isn't working label Feb 4, 2023
@ciur ciur self-assigned this Feb 4, 2023
@ciur
Copy link
Owner Author

ciur commented Feb 4, 2023

Fix: papermerge/papermerge-core#118

ciur added a commit to papermerge/papermerge-core that referenced this issue Feb 4, 2023
@ciur ciur closed this as completed Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant