-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Latest upgrade v0.24.1 docker doesn't create missing columns in postgres #291
Comments
I have exactly the same errors as you, Can you give me the commands you used to add the columns ? Thx But I'm on version 0.23.0 compared to you and the migration doesn't work to a higher version |
I ran these SQL commands, but I'm not sure what I did : ALTER TABLE buckets ADD project_view_id bigint not null default 0;
ALTER TABLE teams ADD oidc_id varchar(250) null;
ALTER TABLE teams ADD issuer text null;
ALTER TABLE teams ADD is_public bool not null default false; Edit: Removing unnecessary SQL commands |
Disclaimer: I'm no postgres guru, you need to enter your postgres docker
By and large i think i added all the commands you did. |
Thanks, that's exactly what I did! |
I think it's worth of a bug ticket. but yeah, for anyone else facing the same problem. @SeiyaGame has all the postgres commands listed. |
The migrations will create all missing columns and tables. Can you share the contents of the Maybe similar to https://kolaente.dev/vikunja/vikunja/issues/2545 |
You're lucky I have a backup of my BDD
Migration table content :
Let me know if you need more information ! |
Can you enable database debug logging and run the failing migration again? |
Sorry, I'm on vacation this week. I'll do it when I get back |
Enjoy your vacation! I'll be gone from Wednesday until sept 1st as well. |
Sorry for my late response I've tried to retrieve as many logs as possible, but I've only got these two, and I don't think they're very informative. vikunja_app:
image: vikunja/vikunja:latest
container_name: vikunja_app
depends_on:
vikunja_db:
condition: service_healthy
environment:
...
- VIKUNJA_LOG_LEVEL=debug
- VIKUNJA_LOG_DATABASE=file
- VIKUNJA_LOG_DATABASELEVEL=debug
- VIKUNJA_LOG_STANDARD=file
- VIKUNJA_LOG_EVENTS=file
- VIKUNJA_LOG_EVENTSLEVEL=debug
- VIKUNJA_LOG_HTTP=file
- VIKUNJA_LOG_PATH=/logs
...
ports:
- 3456:3456
volumes:
- ./files:/app/vikunja/files
- ./logs:/logs database.log
standard.log
|
Seems like the |
I was unable to reproduce this in my testing. Running that exact migration with a previously populated postgres 16 database worked as expected. Which exact postgres version are you using? Can you also send the outpot of |
I'm on the postgres:16 image and when I start my database it tells me I'm on PostgreSQL 16.4. services:
vikunja_db:
image: postgres:16
container_name: vikunja_db
environment:
- POSTGRES_DB=vikunja
- POSTGRES_PASSWORD=RANDOM_PASSWORD
- POSTGRES_USER=vikunja
volumes:
- ./vikunja-db:/var/lib/postgresql/data
The output you asked for :
|
Description
I'm running Vikunja on docker with external postgres DB also in docker.
I upgraded from v0.24.0 to v0.24.1
After upgrading I get migration error
Migration failed: migration 20240315093418 failed: pq: column "project_view_id" does not exist
Dug around and added that column into projects table. that error went away and new errors of similar column not found came out sequentially.
[Empty openid Team Cleanup Cron] Error removing empty openid team: pq: column "oidc_id" does not exist
adding that came
[Empty openid Team Cleanup Cron] Error removing empty openid team: pq: column "issuer" does not exist
added the above 2 into the teams table cleared all the errors.
Maybe the migration scripts can add in an additional line that if it doesn't exists, create it?
Just putting it out there in case anyone facing the same issue and needs help.
Vikunja Version
0.24.1
Browser and version
No response
Can you reproduce the bug on the Vikunja demo site?
No
Screenshots
No response
The text was updated successfully, but these errors were encountered: