]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0126.schema.mbts-with-location-view.sql
truncate fines to max fine amount (LP#1145284)
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0126.schema.mbts-with-location-view.sql
1
2 BEGIN;
3
4 INSERT INTO config.upgrade_log (version) VALUES ('0126'); -- miker
5
6 CREATE OR REPLACE VIEW money.billable_xact_summary_location_view AS
7     SELECT  m.*, COALESCE(c.circ_lib, g.billing_location, r.pickup_lib) AS billing_location
8       FROM  money.materialized_billable_xact_summary m
9             LEFT JOIN action.circulation c ON (c.id = m.id)
10             LEFT JOIN money.grocery g ON (g.id = m.id)
11             LEFT JOIN booking.reservation r ON (r.id = m.id);
12
13 COMMIT;
14