-- Deploy kcls-evergreen:2.9-to-2.10-upgrade-reingest to pg
-- requires: 2.9-to-2.10-upgrade
--- BEGIN; -- TESTING ONLY
+BEGIN; -- TESTING ONLY
+
+SET STATEMENT_TIMEOUT = 0;
-- Get rid of bad date1 sorter values so we can avoid a reingest
SELECT 'Deleting bad pub dates ', CLOCK_TIMESTAMP();
DELETE FROM metabib.record_sorter WHERE attr = 'pubdate' AND value !~ '^\d+$';
+--ROLLBACK; -- TESTING ONLY
+COMMIT;
+
+/* Running the individual partial re-ingests below is not saving us
+ any time. Will do a regular, full after-hours reingest instead */
+
/*
To use the new identifier|genre index, it is necessary to do
a partial reingest of records that have a 655 tag. You can
attribute reingest later.
*/
+/*
SELECT 'Running metabib.reingest_metabib_field_entries() ', CLOCK_TIMESTAMP();
+*/
-- disable output on this big update.
+/*
\o /dev/null
SELECT metabib.reingest_metabib_field_entries(record, FALSE, TRUE, FALSE)
FROM metabib.real_full_rec WHERE tag IN ('655') GROUP BY record;
\o
SELECT 'Running metabib.reingest_record_attributes() ', CLOCK_TIMESTAMP();
+*/
/*
This is a record attribute reingest of your bib records.
You may cancel now without losing the effect of the rest of the
upgrade script, and arrange the reingest later.
*/
+/*
SELECT COUNT(metabib.reingest_record_attributes(id))
FROM biblio.record_entry WHERE deleted IS FALSE;
+*/
-- ROLLBACK; -- TESTING ONLY