https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44319 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 212762 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212762&action=edit Bug 44319: Do not use Koha::Reports in old database revisions db_revs/240600054.pl (Bug 35570) and db_revs/250600011.pl (Bug 37901) use Koha::Reports->search to list saved reports needing manual attention. DBIC selects every column of the *current* schema, which now includes saved_sql.run_type (added by 260600047.pl, Bug 42108). When upgrading from a version older than that column, the query fails: ERROR: DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.run_type' in 'SELECT' and updatedatabase.pl aborts. This breaks the "compare against v24.05.00" DB upgrade CI job (Koha_Main_MariaDB_update). Atomic updates must not depend on the live DBIC schema. Use a plain SELECT id FROM saved_sql instead. Test plan: 1. Load installer/data/mysql/kohastructure.sql from tag v24.05.00 into an empty database and set systempreferences.version to 24.0500000. Add a saved_sql row whose SQL mentions FreeForm and pseudonymized_borrower_attributes. 2. Run installer/data/mysql/updatedatabase.pl 3. Without the patch: it stops at 24.06.00.054 (then 25.06.00.011) with "Unknown column 'me.run_type'". 4. With the patch: the upgrade completes, the ACTION REQUIRED warnings list the report, and the version ends at the current one. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.