From 16e067953bff831e6363c81f4980588fb2d76027 Mon Sep 17 00:00:00 2001 From: Juan Romay Sieira Date: Fri, 30 Mar 2012 10:32:35 +0200 Subject: [PATCH] Bug 7855 - marcflavour files changed to set the maxlength field into fresh installs. Include NORMARC in updatedatabase to change maxlength. Signed-off-by: Paul Poulain --- .../marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql | 3 +++ .../marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql | 2 ++ .../unimarc/mandatory/unimarc_framework_DEFAULT.sql | 3 ++- .../marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql | 2 ++ .../unimarc/mandatory/unimarc_framework_DEFAULT.sql | 2 ++ .../marc21/Obligatoire/marc21_framework_DEFAULT.sql | 2 ++ .../unimarc_complet/Obligatoire/framework_DEFAULT.sql | 2 ++ .../unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql | 3 +++ .../marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql | 3 ++- .../it-IT/marcflavour/unimarc/necessari/unimarc_framework.sql | 2 ++ .../marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql | 2 ++ .../marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql | 2 ++ .../unimarc/mandatory/unimarc_framework_DEFAULT.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 3 +++ 14 files changed, 31 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index af2a59e0a5..aca7cd5563 100644 --- a/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -3995,3 +3995,6 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('998', 's', 'CC (RLIN)', 'CC (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL), ('998', 't', 'RTYP (RLIN)', 'RTYP (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL), ('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL); + +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008'; \ No newline at end of file diff --git a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index 62c64ad5ea..2c836ad505 100644 --- a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -3999,3 +3999,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL); +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008'; \ No newline at end of file diff --git a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql index 02093d3871..a98267b3cd 100644 --- a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql +++ b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql @@ -1402,4 +1402,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('856', 'y', 'Access Method', 'Access Method', 0, 0, '', 8, '', '', '', 0, -5, '', '', '', NULL), ('856', 'z', 'Public Note', 'Public Note', 1, 0, '', 8, '', '', '', 0, -5, '', '', '', NULL); - +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100'; diff --git a/installer/data/mysql/es-ES/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/es-ES/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index 552ab820bd..52bc424679 100644 --- a/installer/data/mysql/es-ES/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/es-ES/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -3997,3 +3997,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL); +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008'; \ No newline at end of file diff --git a/installer/data/mysql/es-ES/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql b/installer/data/mysql/es-ES/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql index 02093d3871..c1acb4c76c 100644 --- a/installer/data/mysql/es-ES/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql +++ b/installer/data/mysql/es-ES/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql @@ -1403,3 +1403,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('856', 'z', 'Public Note', 'Public Note', 1, 0, '', 8, '', '', '', 0, -5, '', '', '', NULL); +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100'; \ No newline at end of file diff --git a/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql b/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql index e967f24ed1..3bff18ea51 100644 --- a/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql @@ -3997,3 +3997,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL); +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008'; \ No newline at end of file diff --git a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql index ad8147d717..3e12a447ae 100644 --- a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql +++ b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql @@ -2033,3 +2033,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('995', 's', 'élément de tri', '', 0, 1, '', -1, '', '', '', NULL, 0, '', NULL, NULL, ''), ('995', 'u', 'note', '', 0, 0, 'items.itemnotes', 10, '', '', '', NULL, 0, '', NULL, NULL, ''); +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100'; \ No newline at end of file diff --git a/installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql b/installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql index 789b0152e2..8cc484cd8a 100644 --- a/installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql +++ b/installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql @@ -7885,3 +7885,6 @@ INSERT INTO `authorised_values` (`id`, `category`, `authorised_value`, `lib`) VA INSERT INTO `authorised_values` (`id`, `category`, `authorised_value`, `lib`) VALUES (147, 'COUNTRY', 'FR', 'France'); INSERT INTO `authorised_values` (`id`, `category`, `authorised_value`, `lib`) VALUES (148, 'COUNTRY', 'EN', 'Grande Bretagne'); INSERT INTO `authorised_values` (`id`, `category`, `authorised_value`, `lib`) VALUES (149, 'COUNTRY', 'DE', 'Allemagne'); + +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100'; \ No newline at end of file diff --git a/installer/data/mysql/it-IT/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/it-IT/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index 913d23fb54..bc496245b2 100644 --- a/installer/data/mysql/it-IT/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/it-IT/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -3992,4 +3992,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('998', 't', 'RTYP (RLIN)', 'RTYP (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL), ('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL); - +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008'; diff --git a/installer/data/mysql/it-IT/marcflavour/unimarc/necessari/unimarc_framework.sql b/installer/data/mysql/it-IT/marcflavour/unimarc/necessari/unimarc_framework.sql index 27929db493..159284efd5 100644 --- a/installer/data/mysql/it-IT/marcflavour/unimarc/necessari/unimarc_framework.sql +++ b/installer/data/mysql/it-IT/marcflavour/unimarc/necessari/unimarc_framework.sql @@ -2675,5 +2675,7 @@ insert into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,` insert into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('995','y','Codice dell\'ente destinatario superiore','',0,0,'',10,'','','',0,-5,'PR',NULL,'',''); insert into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('995','z','Ente destinatario superiore, testo libero','',0,0,'',10,'','','',0,-5,'PR',NULL,'',''); +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100'; SET FOREIGN_KEY_CHECKS=1; diff --git a/installer/data/mysql/nb-NO/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/nb-NO/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index b299f50370..e3bb0bff61 100644 --- a/installer/data/mysql/nb-NO/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/nb-NO/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -3997,3 +3997,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL); +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008'; \ No newline at end of file diff --git a/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index 92963bc201..9e9179b36b 100644 --- a/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -3996,3 +3996,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, '', '', '', NULL); +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008'; \ No newline at end of file diff --git a/installer/data/mysql/pl-PL/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql b/installer/data/mysql/pl-PL/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql index f6bbf9161f..ae0c928cd1 100644 --- a/installer/data/mysql/pl-PL/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql +++ b/installer/data/mysql/pl-PL/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql @@ -1466,3 +1466,5 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('856', 'z', 'Public Note', 'Public Note', 1, 0, '', 8, '', '', '', 0, -5, '', '', '', NULL); +UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; +UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100'; \ No newline at end of file diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e140ff31ea..e76d818bb7 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -5044,6 +5044,9 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { UPDATE marc_subfield_structure SET maxlength = IF ((SELECT value FROM systempreferences WHERE variable = 'marcflavour')='MARC21','40','9999') WHERE tagfield='008'; "); $dbh->do(" + UPDATE marc_subfield_structure SET maxlength = IF ((SELECT value FROM systempreferences WHERE variable = 'marcflavour')='NORMARC','40','9999') WHERE tagfield='008'; + "); + $dbh->do(" UPDATE marc_subfield_structure SET maxlength = IF ((SELECT value FROM systempreferences WHERE variable = 'marcflavour')='UNIMARC','36','9999') WHERE tagfield='100'; "); print "Upgrade to $DBversion done (Add new field maxlength to marc_subfield_structure)\n"; -- 2.39.5