Wrap upgrade script for patron expiry warning
authorDan Scott <dscott@laurentian.ca>
Wed, 21 Nov 2012 12:08:04 +0000 (07:08 -0500)
committerBen Shum <bshum@biblio.org>
Wed, 21 Nov 2012 15:04:05 +0000 (10:04 -0500)
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0745.data.prewarn_expire_setting.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.prewarn_expire_setting.sql [deleted file]

index 7b5b2c3..0886d9e 100644 (file)
@@ -87,7 +87,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 ('0744', :eg_version); -- Dyrcona/dbwells
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0745', :eg_version); -- mrpeters-isl/bshum/dbs
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0745.data.prewarn_expire_setting.sql b/Open-ILS/src/sql/Pg/upgrade/0745.data.prewarn_expire_setting.sql
new file mode 100644 (file)
index 0000000..aec58b6
--- /dev/null
@@ -0,0 +1,30 @@
+-- Evergreen DB patch 0745.data.prewarn_expire_setting.sql
+--
+-- Configuration setting to warn staff when an account is about to expire
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0745', :eg_version);
+
+INSERT INTO config.org_unit_setting_type
+    (name, grp, label, description, datatype)
+    VALUES (
+        'circ.prewarn_expire_setting',
+        'circ',
+        oils_i18n_gettext(
+            'circ.prewarn_expire_setting',
+            'Pre-warning for patron expiration',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'circ.prewarn_expire_setting',
+            'Pre-warning for patron expiration. This setting defines the number of days before patron expiration to display a message suggesting it is time to renew the patron account. Value is in number of days, for example: 3 for 3 days.',
+            'coust',
+            'description'
+        ),
+        'integer'
+    );
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.prewarn_expire_setting.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.prewarn_expire_setting.sql
deleted file mode 100644 (file)
index 151761b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-INSERT INTO config.org_unit_setting_type
-    (name, grp, label, description, datatype)
-    VALUES (
-        'circ.prewarn_expire_setting',
-        'circ',
-        oils_i18n_gettext(
-            'circ.prewarn_expire_setting',
-            'Pre-warning for patron expiration',
-            'coust',
-            'label'
-        ),
-        oils_i18n_gettext(
-            'circ.prewarn_expire_setting',
-            'Pre-warning for patron expiration. This setting defines the number of days before patron expiration to display a message suggesting it is time to renew the patron account. Value is in number of days, for example: 3 for 3 days.',
-            'coust',
-            'description'
-        ),
-        'integer'
-    );
-
-COMMIT;