mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-02 22:57:18 -05:00
Database migration to 1.17.0 fails on mariadb #831
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
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#831
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 @ToeiRei on GitHub (Oct 11, 2020).
Originally assigned to: @BlackDex on GitHub.
Subject of the issue
#1005 - Can't create table bitwarden.favorites (errno: 150 "Foreign key constraint is incorrectly formed")Your environment
1.16.3
Steps to reproduce
Expected behaviour
I would expect the database migration to work
Actual behaviour
Docker container looped on starting the migrations. Trying to run it manually it said
#1005 - Can't create table `bitwarden`.`favorites` (errno: 150 "Foreign key constraint is incorrectly formed")which is related to
in the up script
Relevant logs
@BlackDex commented on GitHub (Oct 11, 2020):
This is weird, i just did the exact same, and have no issues.
Also using the same mariadb version
It is also strange that you can see these error's at all, because foreign-key checking is disabled during migrations because the migrations could create these issues when the order is not completely ok, or we need to do some specials stuff like migrating some data from table x to y.
If you start the server again, does it still produce the same error?
And what if you restart MariaDB first?
@ToeiRei commented on GitHub (Oct 11, 2020):
That's all I get - even with a restart - no matter if I restart rancherOS or the mariaDB debian container
@BlackDex commented on GitHub (Oct 11, 2020):
Wel that is strange. It looks like it is trying to retry it a few times.
@ToeiRei commented on GitHub (Oct 11, 2020):
I got into the error and I think I got a clue: Collation mismatches. Not a big deal.
@BlackDex commented on GitHub (Oct 11, 2020):
Great that you have find the solution.
Could the collation setting being something we need to check, verify or warn on?
@ToeiRei commented on GitHub (Oct 11, 2020):
I would suggest verifying those wouldn't hurt. In my case I think it happened via migrating via various MySQL/MariaDB hosts...
@BlackDex commented on GitHub (Oct 11, 2020):
Thanks, i have added this to the meta feature request #246