From 2057bc5ccd52564c846a47031f889c78b4506cd3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 10 Apr 2018 14:50:16 -0300 Subject: [PATCH] Bug 14769: DBRev 17.12.00.029 Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_14769.perl | 56 ------------------ installer/data/mysql/updatedatabase.pl | 58 +++++++++++++++++++ 3 files changed, 59 insertions(+), 57 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_14769.perl diff --git a/Koha.pm b/Koha.pm index 63766c6974..98d51d74cc 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "17.12.00.028"; +$VERSION = "17.12.00.029"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_14769.perl b/installer/data/mysql/atomicupdate/bug_14769.perl deleted file mode 100644 index ce56842a1a..0000000000 --- a/installer/data/mysql/atomicupdate/bug_14769.perl +++ /dev/null @@ -1,56 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - my $pref = -q|# PERSO_NAME 100 600 696 700 796 800 896 -marc21, 100, ind1:auth1 -marc21, 600, ind1:auth1, ind2:thesaurus -marc21, 696, ind1:auth1 -marc21, 700, ind1:auth1 -marc21, 796, ind1:auth1 -marc21, 800, ind1:auth1 -marc21, 896, ind1:auth1 -# CORPO_NAME 110 610 697 710 797 810 897 -marc21, 110, ind1:auth1 -marc21, 610, ind1:auth1, ind2:thesaurus -marc21, 697, ind1:auth1 -marc21, 710, ind1:auth1 -marc21, 797, ind1:auth1 -marc21, 810, ind1:auth1 -marc21, 897, ind1:auth1 -# MEETI_NAME 111 611 698 711 798 811 898 -marc21, 111, ind1:auth1 -marc21, 611, ind1:auth1, ind2:thesaurus -marc21, 698, ind1:auth1 -marc21, 711, ind1:auth1 -marc21, 798, ind1:auth1 -marc21, 811, ind1:auth1 -marc21, 898, ind1:auth1 -# UNIF_TITLE 130 440 630 699 730 799 830 899 / 240 -marc21, 130, ind1:auth2 -marc21, 240, , ind2:auth2 -marc21, 440, , ind2:auth2 -marc21, 630, ind1:auth2, ind2:thesaurus -marc21, 699, ind1:auth2 -marc21, 730, ind1:auth2 -marc21, 799, ind1:auth2 -marc21, 830, , ind2:auth2 -marc21, 899, ind1:auth2 -# CHRON_TERM 648 -marc21, 648, , ind2:thesaurus -# TOPIC_TERM 650 654 656 657 658 690 -marc21, 650, , ind2:thesaurus -# GEOGR_NAME 651 662 691 / 751 -marc21, 651, , ind2:thesaurus -# GENRE/FORM 655 -marc21, 655, , ind2:thesaurus - -# UNIMARC: Always copy the indicators from the authority -unimarc, *, ind1:auth1, ind2:auth2|; - - $dbh->do( qq| -INSERT IGNORE INTO systempreferences ( value, variable, options, explanation, type ) VALUES ( ?, 'AuthorityControlledIndicators', NULL, 'Authority controlled indicators per biblio field', 'Free' ); - |, undef, $pref ); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 14769: Authorities merge: Set correct indicators in biblio field)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 02cb29f308..20b1a62990 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15760,6 +15760,64 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 9701 - Add default indicators (marc_tag_structure.indX_defaultvalue))\n"; } +$DBversion = '17.12.00.029'; +if( CheckVersion( $DBversion ) ) { + my $pref = +q|# PERSO_NAME 100 600 696 700 796 800 896 +marc21, 100, ind1:auth1 +marc21, 600, ind1:auth1, ind2:thesaurus +marc21, 696, ind1:auth1 +marc21, 700, ind1:auth1 +marc21, 796, ind1:auth1 +marc21, 800, ind1:auth1 +marc21, 896, ind1:auth1 +# CORPO_NAME 110 610 697 710 797 810 897 +marc21, 110, ind1:auth1 +marc21, 610, ind1:auth1, ind2:thesaurus +marc21, 697, ind1:auth1 +marc21, 710, ind1:auth1 +marc21, 797, ind1:auth1 +marc21, 810, ind1:auth1 +marc21, 897, ind1:auth1 +# MEETI_NAME 111 611 698 711 798 811 898 +marc21, 111, ind1:auth1 +marc21, 611, ind1:auth1, ind2:thesaurus +marc21, 698, ind1:auth1 +marc21, 711, ind1:auth1 +marc21, 798, ind1:auth1 +marc21, 811, ind1:auth1 +marc21, 898, ind1:auth1 +# UNIF_TITLE 130 440 630 699 730 799 830 899 / 240 +marc21, 130, ind1:auth2 +marc21, 240, , ind2:auth2 +marc21, 440, , ind2:auth2 +marc21, 630, ind1:auth2, ind2:thesaurus +marc21, 699, ind1:auth2 +marc21, 730, ind1:auth2 +marc21, 799, ind1:auth2 +marc21, 830, , ind2:auth2 +marc21, 899, ind1:auth2 +# CHRON_TERM 648 +marc21, 648, , ind2:thesaurus +# TOPIC_TERM 650 654 656 657 658 690 +marc21, 650, , ind2:thesaurus +# GEOGR_NAME 651 662 691 / 751 +marc21, 651, , ind2:thesaurus +# GENRE/FORM 655 +marc21, 655, , ind2:thesaurus + +# UNIMARC: Always copy the indicators from the authority +unimarc, *, ind1:auth1, ind2:auth2|; + + $dbh->do( q| + INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) + VALUES ( 'AuthorityControlledIndicators', ?, 'Authority controlled indicators per biblio field', NULL, 'Free' ); + |, undef, $pref ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 14769 - Authorities merge: Set correct indicators in biblio field (new system preference AuthorityControlledIndicators))\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5