https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39107 --- Comment #16 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 198550 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198550&action=edit Bug 39107: Remove illrequests_safk FK constraint on illrequests.status_alias as required by MySQL 8.4+ MySQL 8.4 requires foreign keys to reference PRIMARY KEY or UNIQUE keys. Since authorised_values.authorised_value is only unique in combination with category (composite UNIQUE key av_uniq), the FK constraint is not compatible with MySQL 8.4+. Data integrity for illrequests.status_alias is maintained at the application layer: - Koha::ILL::Request->status_alias() validates values against authorised_values (category='ILL_STATUS_ALIAS') before storing - All ILL request operations in Koha use this object layer - CASCADE behaviors (ON DELETE SET NULL, ON UPDATE CASCADE) are already handled by the application layer when modifying/deleting authorised values. Test Plan, using KTD: 1. Prepare KTD for MySQL 8.4 - In koha-testing-docker, edit 'compose/db-mysql.yml' - Comment out the line 5: `# command: --default-authentication-plugin=mysql_native_password` Note: This is required because MySQL 8.4 doesn't support the native password plugin. 2. Start a new instance with MySQL 8.4 - `DB_IMAGE=mysql:8.4 ktd up` - Observe that it fails to start with the errors such as 'DBD::mysql::st execute failed' 3. Apply the patch - `git bz apply 39107` 4. Start the instance again - `DB_IMAGE=mysql:8.4 ktd up` - Observe that it starts successfully 5. Update the database (Optional, only for existing instances) - `perl installer/data/mysql/updatedatabase.pl` 6. Access Koha Staff and OPAC interfaces and verify that everything works as expected 7. Sign off Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are watching all bug changes.