mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 01:35:54 +03:00
[GH-ISSUE #1558] Can't create table bitwarden_rs.sends (errno: 150 "foreign key constraint is incorrectly formed") [v 1.20] #1001
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#1001
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @FuzzyMistborn on GitHub (Mar 29, 2021).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1558
Subject of the issue
When updating to the latest v 1.20 docker image, I get the below error and the container will not load.
Deployment environment
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Docker, here's the below information based on my 1.19 install
Install method: Docker image
Clients used: N/A
Reverse proxy and version: N/A
MySQL/MariaDB or PostgreSQL version: 10.5.9
Other relevant details:
Steps to reproduce
Just updated the container from current installExpected behaviour
Container will loadActual behaviour
I get the below error in the log and it just loops the error/fails to complete the loadTroubleshooting data
Log:
@BlackDex commented on GitHub (Mar 29, 2021):
During migrations foreign key checks are disabled. So this probably looks like some collation issue.
Please see: https://github.com/dani-garcia/bitwarden_rs/discussions/1492
There are some tips on how to solve this.
@FuzzyMistborn commented on GitHub (Mar 29, 2021):
Thanks, that does seem like my issue but I've tried resetting the db character set to both utf8 and utf8mb4 without luck. Here are the commands I'm running in the DB, am I missing something?
ALTER DATABASE bitwarden_rs CHARACTER SET utf8 COLLATE utf8_general_ci;ALTER DATABASE bitwarden_rs CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;@BlackDex commented on GitHub (Mar 29, 2021):
DId you also checked the tables them self?
@FuzzyMistborn commented on GitHub (Mar 29, 2021):
Sorry I'm not really proficient in mariadb. How would I check that?
@FuzzyMistborn commented on GitHub (Mar 29, 2021):
Ah nevermind, figured it out.
SHOW TABLE STATUS;. Looks like mine is stilllatin1_swedish_ciso I'll keep digging.@BlackDex commented on GitHub (Mar 29, 2021):
So best way to fix this i think is this:
After that convert all the tables.
Execute the following, and copy the output.
Copy/Paste the output from above between the following lines:
Now, since all databases should be the same here is a sample with my output: