[Koha-bugs] [Bug 34088] Schema upgrade should short circuit faster if no upgrade needs to be done

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jul 4 02:57:27 CEST 2023


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

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #152543|0                           |1
        is obsolete|                            |

--- Comment #4 from David Cook <dcook at prosentient.com.au> ---
Created attachment 152995
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152995&action=edit
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 an update is needed (based off database version and code
version).

It also moves the logic for C4::Installer::TransformToNum to
Koha::Installer::TransformToNum 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 C4::Installer, 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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list