[GH-ISSUE #977] With Postgres 15.8 as DB in Kubernetes shiori fails to run the migration from 0.2.0 to 0.3.0 #427

Closed
opened 2026-02-25 23:34:12 +03:00 by kerem · 2 comments
Owner

Originally created by @chairraver on GitHub (Sep 4, 2024).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/977

Data

  • v1.7.0-12-g2bcb890 Docker Image from Github
  • Postgres 15.4 Debian Bullseye image running in k3s 1.30 Kubernetes cluster, DB and role created manually, otherwise empty
  • Debian 12 Bookworm with kernel 6.5.13-6-pve
  • Using the contributed Kubernetes manifest as base and deployed to a k3s 1.30 cluster.

Describe the bug / actual behavior

The image is pulled and then started. Opening the logs with kubectl logs for instance, this messade is displayed:

time="2024-09-04T19:48:43Z" level=fatal msg="Error running migration" error="failed to run migration from 0.2.0 to 0.3.0: failed to add has_content column to bookmark table: pq: Spalte »has_content« von Relation »bookmark« existiert bereits"

Spalte »has_content« von Relation »bookmark« existiert bereits

in German translates to English:

Column »has_content« from relation »bookmark« already exists.

DATABASE_URL:
postgres://shiori:xxxxxx@omv-pg-rw.omv-pg.svc.cluster.local/shiori?sslmode=disable

Expected behavior

All migration run successful. Apparently a migration to 0.4.0 is to follow.

To Reproduce

Steps to reproduce the behavior:

  1. Configure with Postgres Url as listed
  2. Start container image
  3. Observe logging output
  4. See error
Originally created by @chairraver on GitHub (Sep 4, 2024). Original GitHub issue: https://github.com/go-shiori/shiori/issues/977 ## Data - v1.7.0-12-g2bcb890 Docker Image from Github - Postgres 15.4 Debian Bullseye image running in k3s 1.30 Kubernetes cluster, DB and role created manually, otherwise empty - Debian 12 Bookworm with kernel 6.5.13-6-pve - Using the contributed Kubernetes manifest as base and deployed to a k3s 1.30 cluster. ## Describe the bug / actual behavior The image is pulled and then started. Opening the logs with kubectl logs for instance, this messade is displayed: time="2024-09-04T19:48:43Z" level=fatal msg="Error running migration" error="failed to run migration from 0.2.0 to 0.3.0: failed to add has_content column to bookmark table: pq: Spalte »has_content« von Relation »bookmark« existiert bereits" Spalte »has_content« von Relation »bookmark« existiert bereits in German translates to English: Column »has_content« from relation »bookmark« already exists. DATABASE_URL: postgres://shiori:xxxxxx@omv-pg-rw.omv-pg.svc.cluster.local/shiori?sslmode=disable ## Expected behavior All migration run successful. Apparently a migration to 0.4.0 is to follow. ## To Reproduce Steps to reproduce the behavior: 1. Configure with Postgres Url as listed 2. Start container image 3. Observe logging output 4. See error
kerem 2026-02-25 23:34:12 +03:00
  • closed this issue
  • added the
    type:bug
    label
Author
Owner

@chairraver commented on GitHub (Sep 7, 2024):

As I look at the error message once again, I realize, that it's in German, which is probably the result of my Postgres instance running with German locale. So it might not actually be a problem of the migration process.

I'll try to dig a bit deeper. So it might not actually a problem at all.

<!-- gh-comment-id:2335145099 --> @chairraver commented on GitHub (Sep 7, 2024): As I look at the error message once again, I realize, that it's in German, which is probably the result of my Postgres instance running with German locale. So it might not actually be a problem of the migration process. I'll try to dig a bit deeper. So it might not actually a problem at all.
Author
Owner

@chairraver commented on GitHub (Sep 7, 2024):

Ok, fixed. For testing I modified the Postgres migration code to also include the checks for the German error messages. With that everything worked fine. Final solution was an alter system command to set lc_messages to 'C'.

alter system set lc_messages = 'C';

With that I'm getting English messages again and the container starts with problems.

<!-- gh-comment-id:2336411006 --> @chairraver commented on GitHub (Sep 7, 2024): Ok, fixed. For testing I modified the Postgres migration code to also include the checks for the German error messages. With that everything worked fine. Final solution was an `alter system` command to set lc_messages to 'C'. alter system set lc_messages = 'C'; With that I'm getting English messages again and the container starts with problems.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#427
No description provided.