LP#1370694: stamp database update
authorGalen Charlton <gmc@esilibrary.com>
Mon, 14 Mar 2016 21:35:59 +0000 (17:35 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 14 Mar 2016 21:35:59 +0000 (17:35 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0974.data.selfcheck_holds_printing.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql [deleted file]

index 533c306..1b27f60 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 ('0973', :eg_version); -- tmccanna/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0974', :eg_version); -- tmccanna/gmcharlt
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0974.data.selfcheck_holds_printing.sql b/Open-ILS/src/sql/Pg/upgrade/0974.data.selfcheck_holds_printing.sql
new file mode 100644 (file)
index 0000000..496a874
--- /dev/null
@@ -0,0 +1,74 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0974', :eg_version); -- tmccanna/gmcharlt
+
+UPDATE action_trigger.event_definition SET template = 
+$$
+[%- USE date -%]
+[%- SET user = target.0.usr -%]
+<div>
+    <style> li { padding: 8px; margin 5px; }</style>
+    <div>[% date.format %]</div>
+    <br/>
+    Holds for:<br/>
+       [% user.family_name %], [% user.first_given_name %]
+       
+    <ol>
+    [% FOR hold IN target %]
+        [%-
+            SET idx = loop.count - 1;
+            SET udata =  user_data.$idx;
+        -%]
+        <li>
+            <div>Title: [% udata.item_title %]</div>
+            <div>Author: [% udata.item_author %]</div>
+            <div>Pickup Location: [% udata.pickup_lib %]</b></div>
+            <div>Status: 
+                [%- IF udata.ready -%]
+                    Ready for pickup
+                [% ELSE %]
+                    #[% udata.queue_position %] of 
+                      [% udata.potential_copies %] copies.
+                [% END %]
+            </div>
+        </li>
+    [% END %]
+    </ol>
+</div>
+
+$$ WHERE id=12
+AND template = 
+$$
+[%- USE date -%]
+[%- SET user = target.0.usr -%]
+<div>
+    <style> li { padding: 8px; margin 5px; }</style>
+    <div>[% date.format %]</div>
+    <br/>
+
+    [% user.family_name %], [% user.first_given_name %]
+    <ol>
+    [% FOR hold IN target %]
+        [%-
+            SET idx = loop.count - 1;
+            SET udata =  user_data.$idx
+        -%]
+        <li>
+            <div>Title: [% hold.bib_rec.bib_record.simple_record.title %]</div>
+            <div>Author: [% hold.bib_rec.bib_record.simple_record.author %]</div>
+            <div>Pickup Location: [% hold.pickup_lib.name %]</div>
+            <div>Status: 
+                [%- IF udata.ready -%]
+                    Ready for pickup
+                [% ELSE %]
+                    #[% udata.queue_position %] of [% udata.potential_copies %] copies.
+                [% END %]
+            </div>
+        </li>
+    [% END %]
+    </ol>
+</div>
+$$
+;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql
deleted file mode 100644 (file)
index e254c24..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-BEGIN;
-
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-UPDATE action_trigger.event_definition SET template = 
-$$
-[%- USE date -%]
-[%- SET user = target.0.usr -%]
-<div>
-    <style> li { padding: 8px; margin 5px; }</style>
-    <div>[% date.format %]</div>
-    <br/>
-    Holds for:<br/>
-       [% user.family_name %], [% user.first_given_name %]
-       
-    <ol>
-    [% FOR hold IN target %]
-        [%-
-            SET idx = loop.count - 1;
-            SET udata =  user_data.$idx;
-        -%]
-        <li>
-            <div>Title: [% udata.item_title %]</div>
-            <div>Author: [% udata.item_author %]</div>
-            <div>Pickup Location: [% udata.pickup_lib %]</b></div>
-            <div>Status: 
-                [%- IF udata.ready -%]
-                    Ready for pickup
-                [% ELSE %]
-                    #[% udata.queue_position %] of 
-                      [% udata.potential_copies %] copies.
-                [% END %]
-            </div>
-        </li>
-    [% END %]
-    </ol>
-</div>
-
-$$ WHERE id=12
-AND template = 
-$$
-[%- USE date -%]
-[%- SET user = target.0.usr -%]
-<div>
-    <style> li { padding: 8px; margin 5px; }</style>
-    <div>[% date.format %]</div>
-    <br/>
-
-    [% user.family_name %], [% user.first_given_name %]
-    <ol>
-    [% FOR hold IN target %]
-        [%-
-            SET idx = loop.count - 1;
-            SET udata =  user_data.$idx
-        -%]
-        <li>
-            <div>Title: [% hold.bib_rec.bib_record.simple_record.title %]</div>
-            <div>Author: [% hold.bib_rec.bib_record.simple_record.author %]</div>
-            <div>Pickup Location: [% hold.pickup_lib.name %]</div>
-            <div>Status: 
-                [%- IF udata.ready -%]
-                    Ready for pickup
-                [% ELSE %]
-                    #[% udata.queue_position %] of [% udata.potential_copies %] copies.
-                [% END %]
-            </div>
-        </li>
-    [% END %]
-    </ol>
-</div>
-$$
-;
-
-COMMIT;