-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Migration seems to fail with error: pq: invalid input syntax for type bigint: "true"
. Help?? I'm stuck on this 293 migration.
#31340
Comments
|
The issue title is a bit long ;P |
Have you recreated your database? |
project
and project_board
tables. Migration seems to fail with error: pq: invalid input syntax for type bigint: "true"
. Help?? I'm stuck on this 293 migration. My docker container keeps restating in a loop now. This happens after I updated to v1.22. On version 1.21 everything worked fine. Migration 293 is failing for me!pq: invalid input syntax for type bigint: "true"
. Help?? I'm stuck on this 293 migration.
No, I didn't. I remember something similar from the past (3 years ago) regarding bigint with boolean type issue as well. Maybe due to a PostgreSQL upgrade from v13 to v14. Where I indeed manually needed to fix these issues. Maybe I missed this column (type). When I migrate to a new major PostgreSQL, your database might gets recreated, that could be the case. Anyhow, I was running Gitea fine for at least 2 or 3 years now. Updates & migrations were running fine, until this one. That being said, |
I fixed the problem using the following 3 queries, now the migration went successful again. And Gitea is up and running! ALTER TABLE project_board ALTER COLUMN "default" DROP DEFAULT;
ALTER TABLE project_board ALTER "default" TYPE bool USING CASE WHEN "default"=0 THEN FALSE ELSE TRUE END;
ALTER TABLE project_board ALTER COLUMN "default" SET DEFAULT FALSE; Thank you! <3 |
I'm using Docker
gitea/gitea:latest-rootless
image with PostgreSQL v14.When I currently dump the project & project_board schema, it looks like this (hope this helps):
Project table:
Project board table:
Originally posted by @melroy89 in #30153 (comment)
The text was updated successfully, but these errors were encountered: