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 <JBoyer@library.in.gov>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
--- /dev/null
+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;