Bug 28972 - Add missing foreign key constraints to holds queue table
Summary: Add missing foreign key constraints to holds queue table
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Kyle M Hall
QA Contact: Joonas Kylmälä
URL:
Keywords:
Depends on:
Blocks: 5334
  Show dependency treegraph
 
Reported: 2021-09-08 12:00 UTC by Kyle M Hall
Modified: 2021-10-28 13:23 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 28972: Add missing foreign key constraints to holds queue table (2.79 KB, patch)
2021-09-08 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 28972: Add missing foreign key constraints to holds queue table (2.82 KB, patch)
2021-09-08 19:24 UTC, David Nind
Details | Diff | Splinter Review
Bug 28972: Add missing foreign key constraints to holds queue table (2.97 KB, patch)
2021-09-18 10:35 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 28972: Make DB rev idempotent (1.78 KB, patch)
2021-09-20 11:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28972: Fix failing tests (5.19 KB, patch)
2021-09-20 14:12 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2021-09-08 12:00:30 UTC
The table tmp_holdsqueue is missing a couple key constraints that should be there.
Comment 1 Kyle M Hall 2021-09-08 12:06:31 UTC
Created attachment 124651 [details] [review]
Bug 28972: Add missing foreign key constraints to holds queue table

The table tmp_holdsqueue is missing a couple key constraints that should
be there, one for biblio and one for borrowers.

Test Plan:
1) "SHOW CREATE TABLE tmp_holdsqueue;" should show no FKs for biblio or borrowers
2) Apply this patch
3) Run updatedatabase.pl
4) "SHOW CREATE TABLE tmp_holdsqueue;" should now show FKs for biblio or borrowers
Comment 2 David Nind 2021-09-08 19:24:14 UTC
Created attachment 124662 [details] [review]
Bug 28972: Add missing foreign key constraints to holds queue table

The table tmp_holdsqueue is missing a couple key constraints that should
be there, one for biblio and one for borrowers.

Test Plan:
1) "SHOW CREATE TABLE tmp_holdsqueue;" should show no FKs for biblio or borrowers
2) Apply this patch
3) Run updatedatabase.pl
4) "SHOW CREATE TABLE tmp_holdsqueue;" should now show FKs for biblio or borrowers

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Joonas Kylmälä 2021-09-18 10:35:44 UTC
Created attachment 125025 [details] [review]
Bug 28972: Add missing foreign key constraints to holds queue table

The table tmp_holdsqueue is missing a couple key constraints that should
be there, one for biblio and one for borrowers.

Test Plan:
1) "SHOW CREATE TABLE tmp_holdsqueue;" should show no FKs for biblio or borrowers
2) Apply this patch
3) Run updatedatabase.pl
4) "SHOW CREATE TABLE tmp_holdsqueue;" should now show FKs for biblio or borrowers

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 4 Jonathan Druart 2021-09-20 11:57:28 UTC
Created attachment 125055 [details] [review]
Bug 28972: Make DB rev idempotent
Comment 5 Jonathan Druart 2021-09-20 12:48:11 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Jonathan Druart 2021-09-20 13:38:05 UTC
Tests from t/db_dependent/HoldsQueue.t and t/db_dependent/Koha/Item.t are failing. Please fix ASAP.
Comment 7 Jonathan Druart 2021-09-20 14:12:20 UTC
Created attachment 125065 [details] [review]
Bug 28972: Fix failing tests