[open-ils-commits] [GIT] Evergreen ILS branch master updated. c464139505dae781cc491b78d1bd277bee99f258
Evergreen Git
git at git.evergreen-ils.org
Mon Mar 19 11:51:43 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via c464139505dae781cc491b78d1bd277bee99f258 (commit)
via 56fb9df55b0ff3a54442120aec0fcf9ba24074a9 (commit)
from 8584fb7013a01a1c0a6164cb709ae02474e9b404 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c464139505dae781cc491b78d1bd277bee99f258
Author: Mike Rylander <mrylander at gmail.com>
Date: Mon Mar 19 11:57:19 2012 -0400
Stamping BluRay videorecording format upgrade
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index c2fee1c..67308e6 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0684', :eg_version); -- berick/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0685', :eg_version); -- tsbere/miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.bluray_vr_format.sql b/Open-ILS/src/sql/Pg/upgrade/0685.data.bluray_vr_format.sql
similarity index 83%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.bluray_vr_format.sql
rename to Open-ILS/src/sql/Pg/upgrade/0685.data.bluray_vr_format.sql
index cfd8c97..95dda74 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.bluray_vr_format.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0685.data.bluray_vr_format.sql
@@ -1,3 +1,14 @@
+-- Evergreen DB patch 0685.data.bluray_vr_format.sql
+--
+-- FIXME: insert description of change, if needed
+--
+BEGIN;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0685', :eg_version);
+
+-- FIXME: add/check SQL statements to perform the upgrade
DO $FUNC$
DECLARE
same_marc BOOL;
@@ -31,3 +42,6 @@ BEGIN
UPDATE config.internal_flag SET enabled = same_marc WHERE name = 'ingest.reingest.force_on_same_marc';
END;
$FUNC$;
+
+
+COMMIT;
commit 56fb9df55b0ff3a54442120aec0fcf9ba24074a9
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Sun Mar 11 18:00:03 2012 -0400
Teach Evergreen about Blu-Ray VR Format
Also, reingest blu-ray records in an update script to populate it.
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index bc737d7..cec8061 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -5502,6 +5502,7 @@ INSERT INTO config.marc21_physical_characteristic_value_map (value,ptype_subfiel
INSERT INTO config.marc21_physical_characteristic_value_map (value,ptype_subfield,label) VALUES ('o',CURRVAL('config.marc21_physical_characteristic_subfield_map_id_seq'),'D-2');
INSERT INTO config.marc21_physical_characteristic_value_map (value,ptype_subfield,label) VALUES ('p',CURRVAL('config.marc21_physical_characteristic_subfield_map_id_seq'),'8 mm.');
INSERT INTO config.marc21_physical_characteristic_value_map (value,ptype_subfield,label) VALUES ('q',CURRVAL('config.marc21_physical_characteristic_subfield_map_id_seq'),'Hi-8 mm.');
+INSERT INTO config.marc21_physical_characteristic_value_map (value,ptype_subfield,label) VALUES ('s',CURRVAL('config.marc21_physical_characteristic_subfield_map_id_seq'),'Blu-ray');
INSERT INTO config.marc21_physical_characteristic_value_map (value,ptype_subfield,label) VALUES ('u',CURRVAL('config.marc21_physical_characteristic_subfield_map_id_seq'),'Unknown');
INSERT INTO config.marc21_physical_characteristic_value_map (value,ptype_subfield,label) VALUES ('v',CURRVAL('config.marc21_physical_characteristic_subfield_map_id_seq'),'DVD');
INSERT INTO config.marc21_physical_characteristic_value_map (value,ptype_subfield,label) VALUES ('z',CURRVAL('config.marc21_physical_characteristic_subfield_map_id_seq'),'Other');
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.bluray_vr_format.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.bluray_vr_format.sql
new file mode 100644
index 0000000..cfd8c97
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.bluray_vr_format.sql
@@ -0,0 +1,33 @@
+DO $FUNC$
+DECLARE
+ same_marc BOOL;
+BEGIN
+ -- Check if it is already there
+ PERFORM * FROM config.marc21_physical_characteristic_value_map v
+ JOIN config.marc21_physical_characteristic_subfield_map s ON v.ptype_subfield = s.id
+ WHERE s.ptype_key = 'v' AND s.subfield = 'e' AND s.start_pos = '4' AND s.length = '1'
+ AND v.value = 's';
+
+ -- If it is, bail.
+ IF FOUND THEN
+ RETURN;
+ END IF;
+
+ -- Otherwise, insert it
+ INSERT INTO config.marc21_physical_characteristic_value_map (value,ptype_subfield,label)
+ SELECT 's',id,'Blu-ray'
+ FROM config.marc21_physical_characteristic_subfield_map
+ WHERE ptype_key = 'v' AND subfield = 'e' AND start_pos = '4' AND length = '1';
+
+ -- And reingest the blue-ray items so that things see the new value
+ SELECT INTO same_marc enabled FROM config.internal_flag WHERE name = 'ingest.reingest.force_on_same_marc';
+ UPDATE config.internal_flag SET enabled = true WHERE name = 'ingest.reingest.force_on_same_marc';
+ UPDATE biblio.record_entry SET marc=marc WHERE id IN (SELECT record
+ FROM
+ metabib.full_rec a JOIN metabib.full_rec b USING (record)
+ WHERE
+ a.tag = 'LDR' AND a.value LIKE '______g%'
+ AND b.tag = '007' AND b.value LIKE 'v___s%');
+ UPDATE config.internal_flag SET enabled = same_marc WHERE name = 'ingest.reingest.force_on_same_marc';
+END;
+$FUNC$;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/950.data.seed-values.sql | 1 +
.../sql/Pg/upgrade/0685.data.bluray_vr_format.sql | 47 ++++++++++++++++++++
3 files changed, 49 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0685.data.bluray_vr_format.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list