[GH-ISSUE #6242] Inconsistent length of uuid field MAY lead to compatible problems #11191

Closed
opened 2026-04-20 14:44:44 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @longyq20 on GitHub (Aug 28, 2025).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/6242

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 GitHub (Aug 28, 2025). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/6242 ### 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_
GiteaMirror added the bug label 2026-04-20 14:44:44 -05:00
Author
Owner

@longyq20 commented on GitHub (Aug 28, 2025):

Discussions 4651
DB schema: Foreign keys invalid

<!-- gh-comment-id:3230573717 --> @longyq20 commented on GitHub (Aug 28, 2025): Discussions 4651 DB schema: Foreign keys invalid
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#11191