https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44319 Bug ID: 44319 Summary: DB revisions using Koha::Reports fail with Unknown column me.run_type on upgrade Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Target Milestone: --- Upgrading a database created before 26.06 fails in updatedatabase.pl with: ERROR: DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.run_type' in 'SELECT' The database revisions 240600054.pl (Bug 35570) and 250600011.pl (Bug 37901) use Koha::Reports->search to list saved reports that need manual attention. DBIC selects every column of the current schema, which includes saved_sql.run_type, added much later by 260600047.pl (Bug 42108). Atomic updates must not depend on the live DBIC schema. This breaks the DB upgrade CI job (Koha_Main_MariaDB_update, compare against v24.05.00). 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 report whose SQL mentions FreeForm and pseudonymized_borrower_attributes (Reports > Create from SQL). 2. Run installer/data/mysql/updatedatabase.pl 3. Before the patch: it stops at 24.06.00.054 and then at 25.06.00.011 with "Unknown column 'me.run_type'". 4. After the patch: the upgrade completes, the ACTION REQUIRED warnings list the report, and the final version is the current one. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.