Koha-clms/installer/data/mysql
Katrin Fischer fee8aa2b1c Bug 18050: Add FK constraint on aqbudgets.budget_period_id
This adds a FK constraint on aqbudgets.budget_period_id so that
a fund cannot be added with an invalid aqbudget.budget_period_id.

We should not have funds that belong to no budget. In case we have, the
update will be skipped and a note displayed.

Part1:
- Before applying the patch
- Make sure you have a budget with some funds linked to it
- You will have to change one of the funds to link to an invalid
  budget with SQL:
  UPDATE aqbudgets SET budget_period_id = 999 WHERE budget_id = max(budget_id);
- Apply patch
- Run updatedatabase - verify that you see the hint about 1 existing fund with invalid budget.
- Repair your fund with SQL
  UPDATE aqbudgets SET budget_period_id = ... WHERE budget_id = max(budget_id);
  (... needs to be your existing budget_period_id)
- Run updatedatabase again - verify it runs successfully now.
- If you try to change the budget_period_id to a non-existing now with SQL, you will
  get a database error. The new FK doesn't permit it.
Part 2:
- Start fresh with the web installer, verify there are no errors on
  creating the database tables

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0ce62b29bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2020-11-13 21:10:39 +00:00
..
atomicupdate Bug 18050: Add FK constraint on aqbudgets.budget_period_id 2020-11-13 21:10:39 +00:00
de-DE Bug 25129: Update German (de-DE) web installer sample files for 20.05 2020-09-14 22:48:25 +00:00
en Bug 26018: Fix frameworks errors with subfields in wrong tab 2020-11-13 14:28:08 +00:00
fr-CA Bug 25629: Fix capitalization in sample notices 2020-07-28 14:59:34 +00:00
fr-FR Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
it-IT Bug 26613: Fix it-IT unimarc_framework.sql installer file 2020-11-13 18:55:09 +00:00
mandatory Bug 17355: DB changes - set is_system for categories 2020-05-04 07:57:21 +01:00
nb-NO Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
pl-PL Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
ru-RU Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
uk-UA Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-14 22:27:32 +00:00
account_credit_types.sql Bug 24081: Add credit_types, offset_types and permissions 2020-03-04 14:46:13 +00:00
account_debit_types.sql Bug 25010: Fix typo 'rewewal' in debit types 2020-04-03 14:26:35 +01:00
account_offset_types.sql Bug 24081: (QA follow-up) Fix small typo 2020-03-04 14:46:25 +00:00
audio_alerts.sql
…
backfill_statistics.pl Bug 13795: Remove occurences of unused columns in code 2019-04-18 10:05:51 +00:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
kohastructure.sql Bug 18050: Add FK constraint on aqbudgets.budget_period_id 2020-11-13 21:10:39 +00:00
labels_upgrade.pl Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
patroncards_upgrade.pl Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
sysprefs.sql Bug 26569: Use gender neutral pronouns in system prefernece explanations 2020-11-13 18:40:13 +00:00
update22to30.pl Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
updatedatabase.pl Bug 26569: DBRev 20.05.05.001 2020-11-13 18:43:14 +00:00
userflags.sql Bug 4461: Adding user flags for managing OPAC problem reports 2020-04-06 11:18:13 +01:00
userpermissions.sql Bug 17268: Add macros table and permissions 2020-05-04 08:25:07 +01:00