LP#1415572: ensure correct version of authority.normalize_heading() is in place
authorGalen Charlton <gmc@esilibrary.com>
Wed, 28 Jan 2015 17:24:02 +0000 (17:24 +0000)
committerBen Shum <bshum@biblio.org>
Tue, 3 Feb 2015 21:00:13 +0000 (16:00 -0500)
commit166912da7a2686783db79a092ef63e8382dcbe15
tree50563e4299712d60922b714b3c27dc676b0744f7
parent9452d114f63b2340ced3c301a05bf2c17f4d53df
LP#1415572: ensure correct version of authority.normalize_heading() is in place

Some upgraded Evergreen databases can have the wrong version
of the authority.normalize_heading() function in place because
of a mixup in the 0848 schema upgrade script.  The problem can
manifest itself by there being rows in authority.record_entry
where the heading and simple_heading columns have "NOHEADING"
values regardless of the control set:

-[ RECORD 1 ]--+---------------------------------------------
heading | NOHEADING_a ff0ed9fcd13e8944d9a718650840787a
simple_heading | NOHEADING_a ff0ed9fcd13e8944d9a718650840787a

This patch ensures that the correct version is in place and
updates authority.record_entry to fix up affected rows without
requiring a full authority ingest.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.use_current_normalize_heading.sql [new file with mode: 0644]