Koha/installer/data/mysql
David Cook 8abaff7784
Bug 34088: Short circuit database upgrade check
If the database version and the code version are the same, we should
short circuit and exit immediately.

This patch adds the Koha::Installer module which can very quickly
check if a db or atomic update is needed.

It also moves the logic for C4::Installer::TransformToNum to
Koha::Installer::TransformToNum for performance reasons.

It also moves the logic for C4::Installer::get_atomic_updates to
Koha::Installer::get_atomic_updates for performance reasons.

Test plan:
1. Apply patch
2. Run `time koha-upgrade-schema kohadev`
3. Note that it completes in less than .1 seconds

4. To test db updates, change the database Version to a number
slightly behind the code version, and run
`time koha-upgrade-schema kohadev`
5. Note that the correct version update is processed

6. To test atomic updates:
cp installer/data/mysql/atomicupdate/skeleton.pl \
       installer/data/mysql/atomicupdate/bug_34088.pl
7. Run `time koha-upgrade-schema kohadev`
8. Note that it takes over 1 second to run and the atomic update
is attempted

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-29 18:16:19 +02:00
..
atomicupdate Bug 20411: DBRev 24.06.00.026 2024-08-26 17:39:47 +02:00
db_revs Bug 20411: DBRev 24.06.00.026 2024-08-26 17:39:47 +02:00
en Bug 36915: (QA follow-up) Passing less to encourage traversal 2024-08-27 12:14:20 +02:00
localization
mandatory Bug 20411: Remove StaffDetailItemSelection system preference 2024-08-26 17:39:46 +02:00
backfill_statistics.pl
fix_unclosed_nonaccruing_fines_bug17135.pl
kohastructure.sql Bug 35044: DB changes + atomicupdate file 2024-08-23 18:21:19 +02:00
labels_upgrade.pl
patroncards_upgrade.pl
update22to30.pl
updatedatabase.pl Bug 34088: Short circuit database upgrade check 2024-08-29 18:16:19 +02:00