]> git.koha-community.org Git - koha.git/commit
Bug 20256: (QA follow-up) Make atomicupdate idempotent
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 1 Feb 2023 14:33:56 +0000 (11:33 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 2 Feb 2023 14:59:26 +0000 (11:59 -0300)
commit4315a6144753cef3d9a6ed8ccc00f520c4a079fe
tree6aa0029dd17b4c9bf4abe607b1e26aaa895d2f95
parent8ea0fc43ca2162cb37ae9b3f47dde02cb0e59477
Bug 20256: (QA follow-up) Make atomicupdate idempotent

Without this patch, running the atomicupdate twice crashes on patrons
with edit_items permissions:

C4::Installer::run_atomic_updates(): DBI Exception: DBD::mysql::db do failed: Duplicate entry '19-9-edit_any_item' for key 'PRIMARY' at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 24303
DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_20256.perl  [14:26:41]
ERROR - C4::Installer::run_atomic_updates(): DBI Exception: DBD::mysql::db do failed: Duplicate entry '19-9-edit_any_item' for key 'PRIMARY' at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 24303

It also aligns this 3yro script with the new structure we've been using.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/atomicupdate/bug_20256.perl [deleted file]
installer/data/mysql/atomicupdate/bug_20256.pl [new file with mode: 0755]