]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/sql/Pg/version-upgrade/3.5.2-3.5.3-upgrade-db.sql
LP2045292 Color contrast for AngularJS patron bills
[Evergreen.git] / Open-ILS / src / sql / Pg / version-upgrade / 3.5.2-3.5.3-upgrade-db.sql
1 --Upgrade Script for 3.5.2 to 3.5.3
2 \set eg_version '''3.5.3'''
3 BEGIN;
4 INSERT INTO config.upgrade_log (version, applied_to) VALUES ('3.5.3', :eg_version);
5
6 SELECT evergreen.upgrade_deps_block_check('1246', :eg_version);
7
8 CREATE OR REPLACE VIEW money.open_with_balance_usr_summary AS
9     SELECT
10         usr,
11         sum(total_paid) AS total_paid,
12         sum(total_owed) AS total_owed,
13         sum(balance_owed) AS balance_owed
14     FROM money.materialized_billable_xact_summary
15     WHERE xact_finish IS NULL AND balance_owed <> 0.0
16     GROUP BY usr;
17
18 COMMIT;
19
20 -- Update auditor tables to catch changes to source tables.
21 --   Can be removed/skipped if there were no schema changes.
22 SELECT auditor.update_auditors();