mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Foreign key constraint violation upon deleting organization with group #1505
Reference in New Issue
Block a user
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 @phiekl on GitHub (Feb 15, 2023).
Subject of the issue
Unable to delete organizations containing groups (with the groups beta feature enabled).
Deployment environment
vaultwarden version: 1.27.0-1ba8275d (HEAD)
Install method: Built from source
Clients used: web vault
Reverse proxy and version: nginx (1.18.0-6.1+deb11u3)
MySQL/MariaDB or PostgreSQL version: postgres-13 (13.9-0+deb11u1)
Environment variables:
Steps to reproduce
Expected behaviour
Organization removed.
Actual behaviour
Organization not removed.
Troubleshooting data
Related log entries in systemd journal:
@BlackDex commented on GitHub (Feb 15, 2023):
Please check: https://github.com/dani-garcia/vaultwarden/wiki/Using-the-MariaDB-%28MySQL%29-Backend#foreign-key-errors-collation-and-charset and see if that solves the issue.
@phiekl commented on GitHub (Feb 15, 2023):
I'm using postgresql though, and as far as I can see collate and ctype is set to en_US.utf8.
@BlackDex commented on GitHub (Feb 15, 2023):
Ah, sorry overlooked that. Ill see if i can reproduce that.
@Misterbabou commented on GitHub (Feb 16, 2023):
Hello,
I have exactly the same issue using MariaDB : 10.10.2
Impossible te delete organization with groups ( if I remove all group manually before deleting organization it works as expected)
Error message:
@BlackDex commented on GitHub (Feb 16, 2023):
Looks like groups are not deleted during the organization delete function, that is what is causing the issue.
Thanks for reporting.
@BlackDex commented on GitHub (Feb 16, 2023):
PR Created which fixes this issue.