mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #1045] [BUG] Can't upgrade DB schema to version 8 when using postgres #374
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#374
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 @tblaschke on GitHub (Nov 21, 2024).
Original GitHub issue: https://github.com/lldap/lldap/issues/1045
Describe the bug
Hi, it seems that upgrading the DB schema fails during the upgrade of version 0.5 to version 0.6 while using postgres as DB.
This causes my lldap instance to be inaccessible, as I can't startup v0.6 and reverting to v0.5 fails due to the schema beeing too new. (Had to restore the DB from a backup)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Update from v0.5 to v0.6 should work even when using Postgres
Logs
LLDAP logs
Postgres logs
@nitnelave commented on GitHub (Nov 21, 2024):
Yeah, that's a bit unfortunate, I thought PostgreSQL supported that.
Anyway, the problem is that you have a user that was added multiple times to the same group. The migration attempts to correct that. I might try to change this to delete all the instances of this membership and then add a single one, that way you don't need LIMIT.
Right now, you can manually delete the instances of duplicated memberships. (In the 0.5 DB)
@nitnelave commented on GitHub (Nov 21, 2024):
Before you do anything manually, I'd like you to test a patch on your DB, if you don't mind. It should solve your problem.
@nitnelave commented on GitHub (Nov 21, 2024):
Can you try the
latestdocker image? That's just 0.6 plus this patch, which should fix your migration problems.@tblaschke commented on GitHub (Nov 21, 2024):
I can confirm
latestfixes the DB schema migration for me and the lldap starts up. Thanks for the quick fix!