LP#1519055: Adding Electronic to seed values; adding upgrade script.
authorJake Litrell <jake@masslnc.org>
Wed, 24 Feb 2016 01:18:48 +0000 (20:18 -0500)
committerBen Shum <ben@evergreener.net>
Wed, 2 Mar 2016 02:22:17 +0000 (21:22 -0500)
Signed-off-by: Jake Litrell <jake@masslnc.org>
Signed-off-by: Ben Shum <ben@evergreener.net>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql [new file with mode: 0644]

index a6cc668..9348d1a 100644 (file)
@@ -7054,6 +7054,13 @@ INSERT INTO config.coded_value_map
     oils_i18n_gettext(633, 'Blu-ray', 'ccvm', 'value'),
     oils_i18n_gettext(633, 'Blu-ray', 'ccvm', 'search_label'));
 
+-- Electronic search format, not opac_visible
+INSERT INTO config.coded_value_map
+    (id, ctype, code, value, opac_visible, search_label) VALUES
+(712, 'search_format', 'electronic', FALSE,
+    oils_i18n_gettext(712, 'Electronic', 'ccvm', 'value'),
+    oils_i18n_gettext(712, 'Electronic', 'ccvm', 'search_label'));
+
 -- RDA content type, media type, and carrier type
 INSERT INTO config.coded_value_map (id, ctype, code, value, concept_uri)
   VALUES (634, 'content_type', 'two-dimensional moving image',
@@ -7451,6 +7458,11 @@ INSERT INTO config.composite_attr_entry_definition
 INSERT INTO config.composite_attr_entry_definition 
     (coded_value, definition) VALUES (608, '{"_attr":"vr_format","_val":"s"}');
 
+-- electronic
+INSERT INTO config.composite_attr_entry_definition
+    (coded_value, definition) VALUES
+(712, '{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}');
+
 -- use the definitions from the icon_format as the basis for the MR hold format definitions
 DO $$
     DECLARE format TEXT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql b/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql
new file mode 100644 (file)
index 0000000..580547b
--- /dev/null
@@ -0,0 +1,16 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXX', :eg_version);
+
+INSERT INTO config.coded_value_map
+    (id, ctype, code, value, opac_visible, search_label) VALUES
+(712, 'search_format', 'electronic', FALSE,
+    oils_i18n_gettext(712, 'Electronic', 'ccvm', 'value'),
+    oils_i18n_gettext(712, 'Electronic', 'ccvm', 'search_label'));
+
+INSERT INTO config.composite_attr_entry_definition
+    (coded_value, definition) VALUES
+(712, '{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}');
+
+
+COMMIT;