<link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
<link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
</links>
- <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
- <actions>
- <retrieve />
- </actions>
- </permacrud>
</class>
<class id="acqdf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula" oils_persist:tablename="acq.distribution_formula" reporter:label="Distribution Formula">
<fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
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 ('1059', :eg_version); -- Stompro/DPearl/kmlussier
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1060', :eg_version); -- Bmagic/csharp/phasefx
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
CREATE OR REPLACE VIEW extend_reporter.copy_count_per_org AS
SELECT acn.record AS bibid,
ac.circ_lib,
- acn.owning_lib,
+ acn.owning_lib,
max(ac.edit_date) AS last_edit_time,
min(ac.deleted::integer) AS has_only_deleted_copies,
count(
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1060', :eg_version);
+
+DROP VIEW IF EXISTS extend_reporter.copy_count_per_org;
+
+
+CREATE OR REPLACE VIEW extend_reporter.copy_count_per_org AS
+ SELECT acn.record AS bibid,
+ ac.circ_lib,
+ acn.owning_lib,
+ max(ac.edit_date) AS last_edit_time,
+ min(ac.deleted::integer) AS has_only_deleted_copies,
+ count(
+ CASE
+ WHEN ac.deleted THEN ac.id
+ ELSE NULL::bigint
+ END) AS deleted_count,
+ count(
+ CASE
+ WHEN NOT ac.deleted THEN ac.id
+ ELSE NULL::bigint
+ END) AS visible_count,
+ count(*) AS total_count
+ FROM asset.call_number acn,
+ asset.copy ac
+ WHERE ac.call_number = acn.id
+ GROUP BY acn.record, acn.owning_lib, ac.circ_lib;
+
+
+COMMIT;
+++ /dev/null
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-DROP VIEW IF EXISTS extend_reporter.copy_count_per_org;
-
-
-CREATE OR REPLACE VIEW extend_reporter.copy_count_per_org AS
- SELECT acn.record AS bibid,
- ac.circ_lib,
- max(ac.edit_date) AS last_edit_time,
- min(ac.deleted::integer) AS has_only_deleted_copies,
- count(
- CASE
- WHEN ac.deleted THEN ac.id
- ELSE NULL::bigint
- END) AS deleted_count,
- count(
- CASE
- WHEN NOT ac.deleted THEN ac.id
- ELSE NULL::bigint
- END) AS visible_count,
- count(*) AS total_count
- FROM asset.call_number acn,
- asset.copy ac
- WHERE ac.call_number = acn.id
- GROUP BY acn.record, ac.circ_lib;
-
-
-COMMIT;