X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=sql%2Fnuke-bibs-and-items.sql;h=d872671aa793817d61e2b3135b17ccbc4f9bcd69;hp=f88bf93725ca41d3e5cf730efe51b603f0dcdb0f;hb=cbf98af9e9d79cee9f8c99267c3e39326487167e;hpb=66a5ec18848e64e83bdf7e1bd3ff84bc696a1845 diff --git a/sql/nuke-bibs-and-items.sql b/sql/nuke-bibs-and-items.sql index f88bf93..d872671 100644 --- a/sql/nuke-bibs-and-items.sql +++ b/sql/nuke-bibs-and-items.sql @@ -1,3 +1,19 @@ +-- Copyright 2009-2012, Equinox Software, Inc. +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation; either version 2 +-- of the License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + BEGIN; DROP TABLE IF EXISTS asset.call_number_temp; @@ -14,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.