From ab9656d51466d4f95cf9595ec2e549469b0610b1 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 1 Apr 2022 09:32:40 +0000 Subject: [PATCH] Bug 2222: Adjust SQL fr-FR unimarc complete Obligatoire norme Content-Type: text/plain; charset=utf-8 This is a large file where frameworkcode is not the last field in each row. So harder to replace since the contents of the last field varies. Awaiting migration to yaml, I chose here to add and drop the column ;) Test plan: I tested this sql script as follows: (sql) delete from auth_subfield_structure; delete from auth_tag_structure; delete from auth_types; (bash) mysql -h YOUR_HOST -p YOUR_CLONE < FILE_NAME Signed-off-by: Marcel de Rooy --- .../unimarc_complet/Obligatoire/autorites_norme_unimarc.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/autorites_norme_unimarc.sql b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/autorites_norme_unimarc.sql index 4352af0869..c73826a0f6 100644 --- a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/autorites_norme_unimarc.sql +++ b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/autorites_norme_unimarc.sql @@ -1594,6 +1594,7 @@ INSERT IGNORE INTO `auth_tag_structure` (`authtypecode`, `tagfield`, `liblibrari -- Contenu de la table `auth_subfield_structure` -- +ALTER TABLE auth_subfield_structure ADD COLUMN frameworkcode varchar(10) NOT NULL DEFAULT ''; -- lazy temporary solution awaiting yaml migration INSERT IGNORE INTO `auth_subfield_structure` (`authtypecode`, `tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `tab`, `authorised_value`, `value_builder`, `seealso`, `isurl`, `hidden`, `linkid`, `kohafield`, `frameworkcode`, `defaultvalue`) VALUES ('', '001', '@', 'tag 001', '', 0, 0, 0, '', '', NULL, NULL, 0, 0, NULL, '', NULL), ('', '003', '@', 'ark', '', 0, 0, 0, '', '', NULL, 0, 0, 0, '', '', ''), @@ -15595,3 +15596,4 @@ INSERT IGNORE INTO `auth_subfield_structure` (`authtypecode`, `tagfield`, `tagsu ('WORK', '886', '2', 'Code de système', '', 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0, NULL, '', NULL), ('WORK', '886', 'a', 'Etiquette de la zone du format source', '', 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, NULL, '', NULL), ('WORK', '886', 'b', 'Indicateurs et sous-zones de la zone du format source', '', 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, NULL, '', NULL); +ALTER TABLE auth_subfield_structure DROP COLUMN frameworkcode; -- lazy temporary solution awaiting yaml migration -- 2.20.1