Koha-clms/installer/data/mysql
Fridolin Somers 730326e08a Bug 11846: Correct database update for restrictions with date 9999-12-31
The borrowers with indefinite restrictions have borrowers.debarred with '9999-12-31'.

Database update for this bug contained :
  INSERT INTO borrower_debarments ( borrowernumber, expiration, comment )
  SELECT borrowernumber, debarred, debarredcomment FROM borrowers WHERE debarred IS NOT NULL

For borrowers where borrowers.debarred is '9999-12-31', this value
is copied into borrower_debarments.expiration.

This is not correct because borrower_debarments.expiration must be
NULL for indefinite restrictions.

This patch corrects update 3.13.00.035 and also adds an update for
databases already updated.

Test plan :
- Use a database with version 3.13.00.000
- Set a borrower as restricted for ever (leave until empty)
- Use sources to master + patch
- Perform updatedatabase
- Look at borrower details, tab "Restrictions"
=> Without patch, you see Expiration 31/12/9999
=> With patch, you see Expiration Infinite

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

I tested both DB revisions by resetting Version of my database (and
adding a SetVersion after the revised older dbrev). This was possible
since the debarred field still exists in borrowers. (I have my doubts
about that, but that goes outside the scope of this report.)

Also note that routine _UpdateBorrowerDebarmentFlags puts back 9999-12-31
into borrowers for indefinite restrictions (which looks not very consistent).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f6131d8e60)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2014-04-23 17:28:47 +02:00
..
atomicupdate Bug 7475: Update configuration 2012-09-19 17:15:25 +02:00
de-DE Bug 11260: (follow-up) repair German sample_z3950_servers.sql 2014-02-18 09:40:18 +01:00
en Bug 11260: (follow-up) remove inadvertant change to English sample_z3950_servers.sql 2014-02-18 09:40:12 +01:00
es-ES Bug 11261: make sample serial frequencies mandatory during installation 2013-12-24 13:57:58 +01:00
fr-FR Bug 11261: make sample serial frequencies mandatory during installation 2013-12-24 13:57:58 +01:00
it-IT Bug 11261: make sample serial frequencies mandatory during installation 2013-12-24 13:57:58 +01:00
nb-NO Bug 11261: make sample serial frequencies mandatory during installation 2013-12-24 13:57:58 +01:00
pl-PL Bug 11261: make sample serial frequencies mandatory during installation 2013-12-24 13:57:58 +01:00
ru-RU Bug 11261: make sample serial frequencies mandatory during installation 2013-12-24 13:57:58 +01:00
uk-UA Bug 11261: make sample serial frequencies mandatory during installation 2013-12-24 13:57:58 +01:00
backfill_statistics.pl Bug 5370: Fix all the references to koha.org 2010-11-08 09:41:49 +13:00
kohastructure.sql Bug 11249: Add Db indexes on borrowers names 2014-01-27 12:24:32 +01:00
labels_upgrade.pl Bug 2505 - Add commented use warnings where missing in the installer/ directory 2010-04-21 20:26:28 +12:00
patroncards_upgrade.pl Bug 2505 - Add commented use warnings where missing in the installer/ directory 2010-04-21 20:26:28 +12:00
sample_only_param_tables.sql Moved location of updater scripts to dbms specific dir. 2007-11-13 11:22:47 -06:00
sysprefs.sql Revert "Bug 8230: Display acquisition details on the catalogue detail page" 2013-12-30 09:49:01 +01:00
update22to30.pl Bug 11398: A typo occurred with occured 2014-01-27 14:54:09 +01:00
updatedatabase.pl Bug 11846: Correct database update for restrictions with date 9999-12-31 2014-04-23 17:28:47 +02:00