From: Galen Charlton Date: Thu, 2 May 2013 15:43:03 +0000 (-0400) Subject: improvements to bib nuking script X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=729120437d95f238d56c7e3531476ff8b0add266 improvements to bib nuking script - truncate a few tables that don't have explicit FK links to bibs or copies - nuke authority records - inform the sysadmin of the next steps to take to complete the purge Signed-off-by: Galen Charlton --- diff --git a/sql/nuke-bibs-and-items.sql b/sql/nuke-bibs-and-items.sql index 9e64647..d872671 100644 --- a/sql/nuke-bibs-and-items.sql +++ b/sql/nuke-bibs-and-items.sql @@ -30,13 +30,24 @@ CREATE TABLE biblio.record_entry_temp AS ( TRUNCATE action.circulation, asset.copy, + asset.opac_visible_copies, biblio.record_entry, asset.call_number, metabib.metarecord_source_map, - metabib.metarecord + metabib.metarecord, + metabib.facet_entry, + metabib.browse_entry, + authority.record_entry, + authority.full_rec, + authority.rec_descriptor CASCADE; INSERT INTO asset.call_number SELECT * FROM asset.call_number_temp; INSERT INTO biblio.record_entry SELECT * FROM biblio.record_entry_temp; +DROP TABLE asset.call_number_temp; +DROP TABLE biblio.record_entry_temp; + +\echo If the purge looks good, please COMMIT +\echo You should also follow with a VACUUM ANALYZE or the like.