[Koha-bugs] [Bug 25078] Gracefully stop updatedatabase/installer when a database change cannot be applied

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 2 13:05:54 CET 2021


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

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

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

--- Comment #20 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 116209
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116209&action=edit
Bug 25078: [POC] Put the db entries in a structure to handle them better

If we have have a hashref (ideally in a module!) we could have do
something more powerful and deal correctly with them.

More work is needed:
- The "export" of the $db_entries hashref from updatedatabase.pl is
really dirty, we don't want to do that
- We should not need to eval { require $updatedatabase_path } from .pm,
but retrieve it from another pm

The main problems with this approach is:
1. Someone will have to move all(?) the entries into the new
structure/file
2. Habit will change, updatedatabase.pl will become a 10 lines script
that will loop over the db entries and display the output

In my opinion it's what we want.

Don't be afraid by the diff size, most of the changes is a move of the
subroutine from updatedatabase.pl to C4/Installer.pm

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


More information about the Koha-bugs mailing list