From 469afd3b1cdd1c8aaac91b30dac49fe51666ac03 Mon Sep 17 00:00:00 2001 From: Jason Boyer Date: Thu, 9 Nov 2017 09:55:42 -0500 Subject: [PATCH] LP1731281: Remove Deleted Items From acvac Table The script that created the acvac table accidentally included entries for deleted items which leads to confusion when titles the library no longer owns are displayed as available again, even though no copies appear on the record detail page. This upgrade script removes any that are left there. Signed-off-by: Jason Boyer Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1731281-acvac-cleanup.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1731281-acvac-cleanup.sql diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1731281-acvac-cleanup.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1731281-acvac-cleanup.sql new file mode 100644 index 0000000000..e7bd8f9885 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1731281-acvac-cleanup.sql @@ -0,0 +1,7 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +DELETE FROM asset.copy_vis_attr_cache WHERE target_copy IN (SELECT id FROM asset.copy WHERE deleted); + +COMMIT; -- 2.11.0