https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35830

--- Comment #29 from Andrii Nugged <[email protected]> ---
... Lucas (@lukeg) has now added fixes for all affected branches in Bug 41421
by changing the `user_permissions` statement to `INSERT IGNORE` in each branch,
so that re-running the update (or running it twice across different branches)
simply skips rows that already exist instead of throwing an error.

I’m OK with the `INSERT IGNORE` approach here — it makes this update properly
idempotent and unblocks all the upgrade paths.

Minor downsides I can see is that:

- if there ever were some unexpected data issues or duplicates in
`user_permissions`, they would now be silently skipped instead of failing
loudly, and

- `updatedatabase` will still print “Added 'merge_borrowers' permission to
existing users with 'edit_borrowers'” even on subsequent runs where no new rows
are actually inserted.

For this very narrow case I think that trade-off is acceptable, especially
given how important it is that we deliver it asap for installs on a broken
upgrade path. 

From a packager point of view (e.g. .deb builds) it’s great that this has now
been fixed in all relevant branches as quickly as it was, and I don't know how
many shipped and potential overlays around the world, but I am just noting
this, not a question.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to