LP#1772955: Stamp Upgrade Script
authorJason Boyer <JBoyer@EquinoxInitiative.org>
Mon, 15 Feb 2021 21:17:06 +0000 (16:17 -0500)
committerJason Boyer <JBoyer@EquinoxInitiative.org>
Mon, 15 Feb 2021 21:17:06 +0000 (16:17 -0500)
Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1246.schema.open_with_balance_usr_summary.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.open_with_balance_usr_summary.sql [deleted file]

index 4b5622c..ee742a9 100644 (file)
@@ -92,7 +92,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 ('1245', :eg_version); -- gmcharlt/terranm/berick
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1246', :eg_version); -- miker / rfrasur / jboyer
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1246.schema.open_with_balance_usr_summary.sql b/Open-ILS/src/sql/Pg/upgrade/1246.schema.open_with_balance_usr_summary.sql
new file mode 100644 (file)
index 0000000..d01833b
--- /dev/null
@@ -0,0 +1,15 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1246', :eg_version);
+
+CREATE OR REPLACE VIEW money.open_with_balance_usr_summary AS
+    SELECT
+        usr,
+        sum(total_paid) AS total_paid,
+        sum(total_owed) AS total_owed,
+        sum(balance_owed) AS balance_owed
+    FROM money.materialized_billable_xact_summary
+    WHERE xact_finish IS NULL AND balance_owed <> 0.0
+    GROUP BY usr;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.open_with_balance_usr_summary.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.open_with_balance_usr_summary.sql
deleted file mode 100644 (file)
index 48ef598..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-CREATE OR REPLACE VIEW money.open_with_balance_usr_summary AS
-    SELECT
-        usr,
-        sum(total_paid) AS total_paid,
-        sum(total_owed) AS total_owed,
-        sum(balance_owed) AS balance_owed
-    FROM money.materialized_billable_xact_summary
-    WHERE xact_finish IS NULL AND balance_owed <> 0.0
-    GROUP BY usr;
-
-COMMIT;