These changes were not included in the version upgrade scripts, since
they were optional. We need them locally.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
UPDATE authority.control_set_authority_field SET sf_list = REGEXP_REPLACE( sf_list, 'e', '', 'i') WHERE tag = '110' AND control_set = 1 AND sf_list ILIKE '%e%';
+-- see note at the bottom of 2.5.3-2.6.0-upgrade-db.sql
+CREATE OR REPLACE VIEW extend_reporter.full_circ_count AS
+ SELECT cp.id,
+ COALESCE((SELECT circ_count FROM extend_reporter.legacy_circ_count WHERE id = cp.id), 0)
+ + (SELECT COUNT(*) FROM action.circulation WHERE target_copy = cp.id)
+ + (SELECT COUNT(*) FROM action.aged_circulation WHERE target_copy = cp.id) AS circ_count
+ FROM asset.copy cp;
+
COMMIT;