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.
Originally created by @Barborica-Alexandru on GitHub (May 15, 2022).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/2470
<!--
# ###
NOTE: Please update to the latest version of vaultwarden before reporting an issue!
This saves you and us a lot of time and troubleshooting.
See:
* https://github.com/dani-garcia/vaultwarden/issues/1180
* https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image
# ###
-->
<!--
Please fill out the following template to make solving your problem easier and faster for us.
This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them.
Remember to hide/redact personal or confidential information,
such as passwords, IP addresses, and DNS names as appropriate.
-->
### Subject of the issue
<!-- Describe your issue here. -->
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.
I wonder what you mean with latest version.
If you mean there is a difference between the database schema regarding the latesttagged docker images and the latestcommit, then yea there is a difference, since they do not match.
The latestcommit equals the testingtagged 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..).
<!-- gh-comment-id:1127379769 -->
@BlackDex commented on GitHub (May 16, 2022):
I wonder what you mean with `latest` version.
If you mean there is a difference between the database schema regarding the `latest` **tagged docker** images and the `latest` **commit**, then yea there is a difference, since they do not match.
The `latest` **commit** equals the `testing` **tagged images**.
The `latest` **tagged** 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..).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Barborica-Alexandru on GitHub (May 15, 2022).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/2470
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..).