[Koha-bugs] [Bug 25078] Update DB process - wrap each DBRev inside a transaction and better error handling
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jun 14 15:29:50 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25078
--- Comment #47 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 121909
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121909&action=edit
Bug 25078: Put db revs into different files to handle them better
This patch suggests to stop using updatedatabase.pl to add new DB revs.
Each DB rev will be in a separate pl files (installer/data/mysql/db_revs).
The switch should ideally be done from 21.06.00.000.
Each DBrev is executed in a try block and a transaction. If something
went wrong, the whole DB rev is rolled back.
Why do /var/log/koha/kohadev/updatedatabase_*.log (not -error) contain
Status: 500
Content-type: text/html
<h1>Software error:</h1>
etc.
Test plan:
- git checkout 5f9333ffda0 (master on 2021-06-14)
- Set the version syspref to 21.0500000:
> update systempreferences set value="21.0500000" where variable="version";
- Apply "Bug 25078: [DO NOT PUSH] DB revs for testing" (restart_all)
- Read the different DBrevs created as examples
- Make sure the different use cases are covered
- execute the updatedatabase script (CLI)
- Set the version syspref to 21.0500000
- Update the DB from the UI
- Set the version syspref to 21.0500000
- execute the updatedatabase script with the --force parameter (for
testing purpose)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list