Wrap upgrade script for TPAC library name links
authorDan Scott <dan@coffeecode.net>
Mon, 22 Jul 2013 14:55:14 +0000 (10:55 -0400)
committerDan Scott <dan@coffeecode.net>
Mon, 22 Jul 2013 14:55:14 +0000 (10:55 -0400)
Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0812.data.add_library_info_url_OUS.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql [deleted file]

index 68648b1..5d938ab 100644 (file)
@@ -91,7 +91,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 ('0811', :eg_version); -- fparks/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0812', :eg_version); -- dbs/kmlussier
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0812.data.add_library_info_url_OUS.sql b/Open-ILS/src/sql/Pg/upgrade/0812.data.add_library_info_url_OUS.sql
new file mode 100644 (file)
index 0000000..e33f38f
--- /dev/null
@@ -0,0 +1,23 @@
+-- Evergreen DB patch 0812.data.add_library_info_url_OUS.sql
+--
+-- Adds YAOUS for enabling information links from the TPAC to a library URL
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0812', :eg_version);
+
+-- FIXME: add/check SQL statements to perform the upgrade
+INSERT into config.org_unit_setting_type
+( name, grp, label, description, datatype, fm_class ) VALUES
+( 'lib.info_url', 'lib',
+    oils_i18n_gettext('lib.info_url',
+        'Library information URL (such as "http://example.com/about.html")',
+        'coust', 'label'),
+    oils_i18n_gettext('lib.info_url',
+        'URL for information on this library, such as contact information, hours of operation, and directions. If set, the library name in the copy details section links to that URL. Use a complete URL, such as "http://example.com/hours.html".',
+        'coust', 'description'),
+    'string', null)
+;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql
deleted file mode 100644 (file)
index 623539b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-INSERT into config.org_unit_setting_type
-( name, grp, label, description, datatype, fm_class ) VALUES
-( 'lib.info_url', 'lib',
-    oils_i18n_gettext('lib.info_url',
-        'Library information URL (such as "http://example.com/about.html")',
-        'coust', 'label'),
-    oils_i18n_gettext('lib.info_url',
-        'URL for information on this library, such as contact information, hours of operation, and directions. If set, the library name in the copy details section links to that URL. Use a complete URL, such as "http://example.com/hours.html".',
-        'coust', 'description'),
-    'string', null)
-;