[PR #6694] Force MySQL to use correct name and collation #7465

Open
opened 2026-03-07 21:18:04 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/6694
Author: @BlackDex
Created: 1/9/2026
Status: 🔄 Open

Base: mainHead: force-mysql-names-collate


📝 Commits (1)

  • 9a32017 Force MySQL to use correct name and collation

📊 Changes

2 files changed (+36 additions, -9 deletions)

View changed files

📝 .env.template (+1 -1)
📝 src/db/mod.rs (+35 -8)

📄 Description

This should force all MySQL/MariaDB connections to use the correct names and collation to be utf8mb4 and utf8mb4_unicode_ci. It will not fix current tables which have the wrong charset or collation, but it should prevent new databases and future additions to use the wrong set.

Also made sure that the init statements are also applied during migrations, which currently did not happen.

Should prevent / resolve #6611 like issues in the future.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/6694 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 1/9/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `force-mysql-names-collate` --- ### 📝 Commits (1) - [`9a32017`](https://github.com/dani-garcia/vaultwarden/commit/9a320171e52d12e51cd0119b1c0065e47019170f) Force MySQL to use correct name and collation ### 📊 Changes **2 files changed** (+36 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `.env.template` (+1 -1) 📝 `src/db/mod.rs` (+35 -8) </details> ### 📄 Description This should force all MySQL/MariaDB connections to use the correct names and collation to be `utf8mb4` and `utf8mb4_unicode_ci`. It will not fix current tables which have the wrong charset or collation, but it should prevent new databases and future additions to use the wrong set. Also made sure that the init statements are also applied during migrations, which currently did not happen. Should prevent / resolve #6611 like issues in the future. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-07 21:18:04 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#7465