Bug 16103 - Remove FK constraint for sms_provider_id in deletedborrowers
Summary: Remove FK constraint for sms_provider_id in deletedborrowers
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-18 13:11 UTC by Marcel de Rooy
Modified: 2016-12-05 21:22 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16103: Remove FK sms_provider_id in deletedborrowers (1.46 KB, patch)
2016-03-18 13:25 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 16103: Remove FK sms_provider_id in deletedborrowers (1.96 KB, patch)
2016-03-31 18:06 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2016-03-18 13:11:37 UTC

    
Comment 1 Marcel de Rooy 2016-03-18 13:25:23 UTC Comment hidden (obsolete)
Comment 2 Brendan Gallagher 2016-03-31 17:58:11 UTC
Fixed in Master! (just pushed update)
Comment 3 Tomás Cohen Arazi 2016-03-31 18:06:05 UTC
Created attachment 49742 [details] [review]
Bug 16103: Remove FK sms_provider_id in deletedborrowers

This patch removes the FK constraint for sms_provider_id in table
deletedborrowers. (We do not need FKs in that table.)
It just corrects a newly added db revision in updatedatabase.
If this is pushed before releasing master, no need to do anything more.

Note that this key was not found in kohastructure and the DBIx schema.

Edit:

To test:
- With master DB run
  $ prove t/db_dependent/TestBuilder.t
=> SUCCESS: Tests pass
- Create a clean 3.22.00 DB
- Run the upgrade process
  $ perl installer/data/mysql/updatedatabase.pl
- Run
  $ prove t/db_dependent/TestBuilder.t
=> FAIL: Tests fail due to discrepancies in DB structure
- Re-create teh clean 3.22.00 DB
- Apply the patch
- Run the upgrade process
  $ perl installer/data/mysql/updatedatabase.pl
- Run
  $ prove t/db_dependent/TestBuilder.t
=> SUCCESS: Tests now pass

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>