[GH-ISSUE #2079] DB migration 20211024164321 fails [Pg; datetime] #1147

Closed
opened 2026-03-03 02:06:39 +03:00 by kerem · 2 comments
Owner

Originally created by @philpennock on GitHub (Nov 1, 2021).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/2079

I run VaultWarden on a home K3S cluster, building the image locally with stuff like private certs in (to verify cert issued to the DB server), etc; it's been a great experience to date.

My Dockerfile is always docker/amd64/Dockerfile with local cert additions.
I store data in PostgreSQL.

Today I tried to update from version 1.22.2 installed on 2021-08-09 to version 1.23.0-7-ga2316ca

Startup fails with:

Running migration 20211024164321
Executing migration script 20211024164321/up.sql
[2021-11-01 00:15:22.845][vaultwarden::util][WARN] Can't connect to database, retrying: DieselMig.
[CAUSE] QueryError(
    DatabaseError(
        __Unknown,
        "type \"datetime\" does not exist",
    ),
)

Reverted docker image and everything is running fine on the old version.

I don't know enough about Rust or Diesel to help much, but can try fixes as needed. My hope is this is just a MySQL assumption which fails on PostgreSQL (12.7).

Originally created by @philpennock on GitHub (Nov 1, 2021). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/2079 I run VaultWarden on a home K3S cluster, building the image locally with stuff like private certs in (to verify cert issued to the DB server), etc; it's been a great experience to date. My Dockerfile is always docker/amd64/Dockerfile with local cert additions. I store data in PostgreSQL. Today I tried to update from version 1.22.2 installed on 2021-08-09 to version 1.23.0-7-ga2316ca Startup fails with: ``` Running migration 20211024164321 Executing migration script 20211024164321/up.sql [2021-11-01 00:15:22.845][vaultwarden::util][WARN] Can't connect to database, retrying: DieselMig. [CAUSE] QueryError( DatabaseError( __Unknown, "type \"datetime\" does not exist", ), ) ``` Reverted docker image and everything is running fine on the old version. I don't know enough about Rust or Diesel to help much, but can try fixes as needed. My hope is this is just a MySQL assumption which fails on PostgreSQL (12.7).
kerem 2026-03-03 02:06:39 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jjlin commented on GitHub (Nov 1, 2021):

Sorry, my mistake, I don't usually test on PostgreSQL.

<!-- gh-comment-id:955831801 --> @jjlin commented on GitHub (Nov 1, 2021): Sorry, my mistake, I don't usually test on PostgreSQL.
Author
Owner

@philpennock commented on GitHub (Nov 1, 2021):

Confirmed fixed by building with pr/2080 checked out. Thanks!

<!-- gh-comment-id:955918635 --> @philpennock commented on GitHub (Nov 1, 2021): Confirmed fixed by building with pr/2080 checked out. Thanks!
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/vaultwarden#1147
No description provided.