From a8e4f4ac2d1bf42ffe5ca41db2ae902c739e49d8 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Mon, 4 Jun 2018 13:10:31 -0400 Subject: [PATCH] LP#1764542 - Update older sites to MODS 3.3 MODS 3.3 support was introduced in March 2009, but this change was never included in an upgrade script. Older sites on 3.1+ will need to apply this update to avoid scary segmentation faults, and it should be harmless for newer sites and desirable for those on 3.0 or older. Signed-off-by: Chris Sharp Signed-off-by: Ben Shum --- .../sql/Pg/upgrade/XXXX.schema.lp1764542-mods33-update.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1764542-mods33-update.sql diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1764542-mods33-update.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1764542-mods33-update.sql new file mode 100644 index 0000000000..2ec2a573ed --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1764542-mods33-update.sql @@ -0,0 +1,13 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +-- update mods33 data entered by 1100 with a format of 'mods32' +-- harmless if you have not run 1100 yet +UPDATE config.metabib_field SET format = 'mods33' WHERE format = 'mods32' and id in (38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50); + +-- change the default format to 'mods33' +ALTER TABLE config.metabib_field ALTER COLUMN format SET DEFAULT 'mods33'::text; + +COMMIT; + -- 2.11.0