From f79e49b01764a38b5a9aeb6e459597c5e9f66315 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. Content-Type: text/plain; charset="utf-8" --- .../marc21/mandatory/marc21_framework_DEFAULT.sql | 3 +++ .../marc21/mandatory/marc21_framework_DEFAULT.sql | 2 ++ .../mandatory/unimarc_framework_DEFAULT.sql | 3 ++- .../marc21/mandatory/marc21_framework_DEFAULT.sql | 2 ++ .../mandatory/unimarc_framework_DEFAULT.sql | 2 ++ .../Obligatoire/marc21_framework_DEFAULT.sql | 2 ++ .../Obligatoire/framework_DEFAULT.sql | 2 ++ .../Obligatoire/framework_DEFAULT.sql | 3 +++ .../marc21/mandatory/marc21_framework_DEFAULT.sql | 3 ++- .../unimarc/necessari/unimarc_framework.sql | 2 ++ .../marc21/mandatory/marc21_framework_DEFAULT.sql | 2 ++ .../marc21/mandatory/marc21_framework_DEFAULT.sql | 2 ++ .../mandatory/unimarc_framework_DEFAULT.sql | 2 ++ .../mandatory/unimarc_bibliographic_[DEFAULT].sql | 3 ++- .../mandatory/unimarc_bibliographic_[DEFAULT].sql | 3 +++ installer/data/mysql/updatedatabase.pl | 3 +++ 16 files changed, 36 insertions(+), 3 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 af2a59e..aca7cd5 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 62c64ad..2c836ad 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 02093d3..a98267b 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 552ab82..52bc424 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 02093d3..c1acb4c 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 e967f24..3bff18e 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 ad8147d..3e12a44 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 789b015..8cc484c 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 913d23f..bc49624 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 27929db..159284e 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 b299f50..e3bb0bf 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 92963bc..9e9179b 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 f6bbf91..ae0c928 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/ru-RU/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql b/installer/data/mysql/ru-RU/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql index 4f71b87..31c2b60 100644 --- a/installer/data/mysql/ru-RU/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql +++ b/installer/data/mysql/ru-RU/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql @@ -1760,4 +1760,5 @@ 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 ('899','y','Публикуемое примечание','Публикуемое примечание',1,0,'',8,'','','',0,0,'',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 ('899','z','Публикуемое примечание','Публикуемое примечание',1,0,'',8,'','','',0,0,'',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/uk-UA/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql b/installer/data/mysql/uk-UA/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql index 8cd54f3..893d849 100644 --- a/installer/data/mysql/uk-UA/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql +++ b/installer/data/mysql/uk-UA/marcflavour/unimarc/mandatory/unimarc_bibliographic_[DEFAULT].sql @@ -2366,3 +2366,6 @@ INSERT INTO marc_subfield_structure (tagfield, tagsubfield, liblibrarian, libopa ('886', '2', 'Код правил каталогізації і форматів', '', 0, 1, NULL, -1, NULL, NULL, '', NULL, NULL, '', NULL, NULL, NULL), ('886', 'a', 'Мітка поля вихідного формату', '', 0, 1, NULL, -1, NULL, NULL, '', NULL, NULL, '', NULL, NULL, NULL), ('886', 'b', 'Індикатори та підполя вихідного формату', '', 0, 1, NULL, -1, NULL, NULL, '', NULL, NULL, '', NULL, 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/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ddc288c..7ef9f2c 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"; -- 1.7.1