DB migration 20211024164321 fails [Pg; datetime] #1270

Closed
opened 2025-10-09 17:09:34 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @philpennock on GitHub.

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. 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).
OVERLORD added the bug label 2025-10-09 17:09:35 +03:00
Author
Owner

@jjlin commented on GitHub:

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

@jjlin commented on GitHub: Sorry, my mistake, I don't usually test on PostgreSQL.
Author
Owner

@philpennock commented on GitHub:

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

@philpennock commented on GitHub: Confirmed fixed by building with pr/2080 checked out. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1270