Summary: | kohastructure.sql doesn't load on new MySQL versions | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Database | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | dcook, jonathan.druart, martin.renvoize, matt.blenkinsop, pedro.amorim, tomascohen |
Version: | Main | Keywords: | RM_priority |
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 20581 | ||
Bug Blocks: |
Description
Tomás Cohen Arazi (tcohen)
2025-02-12 13:24:31 UTC
Interesting discussion on https://bugs.mysql.com/bug.php?id=114838 (In reply to Tomás Cohen Arazi (tcohen) from comment #0) > Based on the error, it should be solved easily by adding a UNIQUE constraint. Unfortunately, we can't do that in this case. illrequests_safk is a foreign key to authorised_values.authorised_value which cannot be unique. There's lots of values in that column like 0 or 1 which apply to multiple different authorised value categories. But... then we have to think how can illrequests.status_alias possibly have a foreign key on authorised_values.authorised_value? It looks like status_alias was added by bug 20581 and originally status_alias referenced authorised_values.id but on that same bug there was a patch that changed it to authorised_values.authorised_value It looks like there was some talk about using composite keys, but DBIx::Class might not have been able to handle that? One of the downsides of the authorised_values table... -- I think the fix is to remove the illrequests_safk foreign key and fix any resulting breakages. (In reply to David Cook from comment #1) > > I think the fix is to remove the illrequests_safk foreign key and fix any > resulting breakages. Agreed, and it seems to be the only occurrence. Looping in PTFS-Europe folk as they would have an interest in this one I think |