https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41682
--- Comment #4 from Jonathan Druart <[email protected]> --- Created attachment 191906 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191906&action=edit Bug 41682: Sync DB and sysprefs.sql for new and upgraded installs This patch removes the discrepancies and put in sync the systempreferences table for new and upgraded installations. Main changes: * Set options to NULL when options="" * Fix explanation when different * Fix wrong order (some rows had options=explanation) * Fix wrong type "Yes/No" => "YesNo" * Remove StaffLoginBranchBasedOnIP: both StaffLoginLibraryBasedOnIP and StaffLoginBranchBasedOnIP are in the DB for upgraded installs * Remove the 'showsql' from the test. If we need it back then it must be a maintenance script. * Improve the tests: * Compare sysprefs.sql and the DB content for options, explanation and type * Catch type not defined * Catch incorrect YesNo values (must be 0 or 1) Later: * Add a C4::Installer sub to add new syspref: add_pref( { variable => $variable, value => $value, options => $options, explanation => $explanation, type => $type } ); * Clean 'type' and make it an ENUM * Make it easy to run the test for devs (should be in xt but we need it in t/db_dependent for packages - FIXME?) * Run the tests on upgraded installs on CI Test plan: 0. Apply the "tests" patch only 1. prove it => It fails loudly 2. Apply the DB change and run updatedatabase, prove the tests => they pass 3. Test upgraded installs: * checkout v24.05.00 (the version we use for Jenkins' Koha_Main_MariaDB_update job) * reset_all * checkout the branch with this patchset * updatabase * prove t/db_dependent/check_sysprefs.t => Should be green -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
