Koha-clms/installer/data/mysql
Jonathan Druart 6729f22ff0
Bug 22275: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation
18.06.00.060 will fail if custom Classification sources were created.

In that case we should use the 'generic' split rule.

Test plan:
% git checkout -b bug_22395_pre 3a0cba67f1
Reset the DB
Go to  Home › Administration › Classification sources
Create a custom "Classification filing rules"
Create a custom "Classification sources" using this filing rules
% git checkout master
% perl installer/data/mysql/updatedatabase.pl
=> Without this patch you will get:
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`#sql-33a_67`, CONSTRAINT `class_source_ibfk_2` FOREIGN KEY (`class_split_rule`) REFERENCES `class_split
_rules` (`class_split_rule`)) [for Statement "
            ALTER TABLE class_sources
            ADD CONSTRAINT class_source_ibfk_2 FOREIGN KEY (class_split_rule)
            REFERENCES class_split_rules (class_split_rule)
        "] at installer/data/mysql/updatedatabase.pl line 17104.

=> With this patch applied the FK will be created successfully
class_sources.class_split_rule will be set to "generic" for these custom values.

Signed-off-by: Oliver Behnke <oliver.behnke@aei.mpg.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 29bc2b5832)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-03-12 08:41:49 +00:00
..
atomicupdate Bug 19575: DBRev 18.11.03.002 2019-03-05 14:56:54 +00:00
de-DE Bug 22095: Replaced dead links with working links 2019-01-23 12:08:06 +00:00
en Bug 21710: Fix typo in atributes in installer 2019-02-25 15:28:50 +00:00
es-ES Bug 22095: Replaced dead links with working links 2019-01-23 12:08:06 +00:00
fr-CA Bug 22095: Replaced dead links with working links 2019-01-23 12:08:06 +00:00
fr-FR Bug 20491: Updating the MARC subfield desciption of 952q 2019-01-31 16:36:50 +00:00
it-IT Bug 22095: Replaced dead links with working links 2019-01-23 12:08:06 +00:00
mandatory Bug 21730: Add missing PA_CLASS authorized values categories 2018-11-26 12:40:32 +00:00
nb-NO Bug 21710: Fix typo in atributes in installer 2019-02-25 15:28:50 +00:00
pl-PL Bug 20491: Updating the MARC subfield desciption of 952q 2019-01-31 16:36:50 +00:00
ru-RU Bug 22024: Update translated web installer files with new class splitting rules 2018-12-20 09:54:32 +00:00
uk-UA Bug 21710: Fix typo in atributes in installer 2019-02-25 15:28:50 +00:00
account_offset_types.sql Bug 20997: (QA follow-up) POD fixes and offset type consistency 2018-08-10 12:30:36 +00:00
audio_alerts.sql Bug 11431: (QA followup) Make audio alerts sql top level 2015-11-04 12:33:53 -03:00
backfill_statistics.pl Bug 20000: Use Modern::Perl in installer scripts 2019-02-11 13:51:12 +00:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 17135: [QA Follow-up] Changes as to reporting 2016-09-16 10:47:03 +00:00
kohastructure.sql Bug 20544: Wrong comment database documentation on itemnotes 2019-02-25 15:27:00 +00:00
labels_upgrade.pl Bug 20000: Use Modern::Perl in installer scripts 2019-02-11 13:51:12 +00:00
patroncards_upgrade.pl Bug 20000: Use Modern::Perl in installer scripts 2019-02-11 13:51:12 +00:00
sysprefs.sql Bug 22132: Add RESTBasicAuth syspref 2019-02-01 15:42:38 +00:00
update22to30.pl Bug 20000: Use Modern::Perl in installer scripts 2019-02-11 13:51:12 +00:00
updatedatabase.pl Bug 22275: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation 2019-03-12 08:41:49 +00:00
userflags.sql Bug 11897: Add mising semi-colon to user*.sql 2018-10-09 17:19:00 +00:00
userpermissions.sql Bug 21961: Fix typo in manage_didyoumean permission 2018-12-12 10:57:09 +00:00