Inconsistent length of uuid field MAY lead to compatible problems #376

Closed
opened 2026-04-05 21:04:15 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @longyq20 on 8/28/2025

Prerequisites

Vaultwarden Support String

I've encountered a foreign key field compatibility issue during a database migration. After reviewing the code, I noticed that the length of the uuid field is inconsistent across different tables (e.g., CHAR(36) or VARCHAR(40)). Some databases do not allow this. I wonder why they were designed with different lengths.

Image

Vaultwarden Build Version

v1.34.3

Deployment method

Official Container Image

Custom deployment method

No response

Reverse Proxy

none

Host/Server Operating System

Linux

Operating System Version

No response

Clients

Android

Client Version

No response

Steps To Reproduce

Create server container with remote database.

Expected Result

May be the length of uuid should be consistenet since it is usually fixed.

Actual Result

Inconsistent length of uuid field caused migration problems

Logs


Screenshots or Videos

No response

Additional Context

No response

*Originally created by @longyq20 on 8/28/2025* ### Prerequisites - [x] I have searched the existing **Closed _AND_ Open** [Issues](https://github.com/dani-garcia/vaultwarden/issues?q=is%3Aissue%20) **_AND_** [Discussions](https://github.com/dani-garcia/vaultwarden/discussions?discussions_q=) - [ ] I have searched and read the [documentation](https://github.com/dani-garcia/vaultwarden/wiki/) ### Vaultwarden Support String I've encountered a foreign key field compatibility issue during a database migration. After reviewing the code, I noticed that the length of the uuid field is inconsistent across different tables (e.g., CHAR(36) or VARCHAR(40)). Some databases do not allow this. I wonder why they were designed with different lengths. <img width="2000" height="1684" alt="Image" src="https://github.com/user-attachments/assets/c3fbb96d-fb15-493e-8fa1-26cac69e63d9" /> ### Vaultwarden Build Version v1.34.3 ### Deployment method Official Container Image ### Custom deployment method _No response_ ### Reverse Proxy none ### Host/Server Operating System Linux ### Operating System Version _No response_ ### Clients Android ### Client Version _No response_ ### Steps To Reproduce Create server container with remote database. ### Expected Result May be the length of `uuid` should be consistenet since it is usually fixed. ### Actual Result Inconsistent length of uuid field caused migration problems ### Logs ```text ``` ### Screenshots or Videos _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#376