]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Avoid collisions of normalized values going into metabib.browse_entry
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 14 May 2012 16:46:44 +0000 (12:46 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 14 May 2012 19:18:41 +0000 (15:18 -0400)
commitebdf3e9527c2755195d3126b5468e4636ea5cc6a
tree96f456d910d52b04705dea97fd52ef6943194ae0
parenta4561f581eb54c088afb95d8758dd849d6f3d69e
Avoid collisions of normalized values going into metabib.browse_entry

This fixes a bug that prevented successful reingestion of bib records
during the 2.1->2.2 upgrade in some cases.  Reported by George Duimovich.

Key part here:

> ERROR: duplicate key value violates unique constraint
> "browse_entry_value_key"
> DETAIL: Key (value)=(545575) already exists.
> CONTEXT: SQL statement "INSERT INTO metabib.browse_entry (value) VALUES
>                     (metabib.browse_normalize(ind_data.value,

George confirmed that the changes to the version upgrade script fixed
the problem for him.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0711.schema.reingest_avoid_collision_better.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql