mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-08 23:14:39 -05:00
wierd database discrepancy between binary and docker #1267
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Barborica-Alexandru on GitHub (May 15, 2022).
Subject of the issue
Hello, I've been using vaultwarden by building the binary for years and have recently decided to switch to the docker container. In both cases I am using the postgresql backend. On my original database in the table devices there is a constraint devices_pkey that includes uuid and user_uuid. On the docker container version this contraint includes just uuid and not user_uuid which leads to a postgresql error when trying to log in because the query to add the device fails. The solution is to delete and recreate the constraint with just uuid as is on the freshly installed docker version.
Im just curios how this happened? And could there be other discrepancies that could lead to issues if I just use my old database with the corrected constraint?
Deployment environment
Binary and docker, migration done on latest versions on both platforms, same database.
@BlackDex commented on GitHub (May 16, 2022):
I wonder what you mean with
latestversion.If you mean there is a difference between the database schema regarding the
latesttagged docker images and thelatestcommit, then yea there is a difference, since they do not match.The
latestcommit equals thetestingtagged images.The
latesttagged image equals the latest stable released version.If you build from source your self or use the docker build images they should match 1:1 when you use the exact same commit hash (depending a little bit on which OS you build it because of libraries etc..).