-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix upgrade of user_ldap when oc_group_members contains duplicated uids #42576
Conversation
/backport to stable28 |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
654f862
to
6d0f0fc
Compare
should we check on |
No, see comment, even if it fails for another reason it’s better to ignore and keep going, the background job can fix the data later. |
Does the |
No, it means this PR targets master branch which will be 29. |
SQLSTATE[23000]: Integrity constraint violation
#42232Summary
When upgrading to 28, if oc_group_members contains duplicated uids, migration was failing on unicity constraint.
Also ignore DB errors for this migration step, as people which failed the upgrade before will have a non-empty table in oc_group_membership, and there is no data loss in this case since membership information is in the LDAP and will be fetched by the background job on the next run if incorrect or incomplete.
Checklist