]> git.koha-community.org Git - koha.git/commit
Bug 37000: (Bug 36120 follow-up) Improve reliability of database update
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 4 Jun 2024 10:58:54 +0000 (11:58 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 10 Jun 2024 15:35:43 +0000 (16:35 +0100)
commit8cedcfd5c86f97e75586870c5e758872f8bc9ba9
tree7f35a2269677e753bf9627ca3dd4d2d7708cc8a5
parentb9ca6b4a36c4e211a8ded1cc2be29ce8defbd7e9
Bug 37000: (Bug 36120 follow-up) Improve reliability of database update

This patch adds a series of fallthroughs to ensure pickup_library_id is
always set prior to adding the NOT NULL constraint.

We initially only looked at items.homebranch but as that's a nullable
field itself, we now look at items.holdingbranch before finally
defaulting to the first available branch in the branches table in the
worst case.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
installer/data/mysql/db_revs/231200044.pl