]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Enable merge of authority records to do the right thing
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Nov 2010 02:46:51 +0000 (02:46 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Nov 2010 02:46:51 +0000 (02:46 +0000)
commitc107c091c364e1ec8d08ddc252c34284f5fc8ac3
treed261670b3e1569cc62c7c82e7ad8c5d9f90091e1
parent703408cdb026cdec22cd3e1d332d5c92a83ea677
Enable merge of authority records to do the right thing

The target and source authority record was flipped, causing
the update to fail. In reconsidering this function, it is not
necessary to change the contents of the source authority record
just to propagate the content of the target authority record
to any linked bibliographic records.

Instead, take the approach of updating the ID of the controlled
field in the bib record, then temporarily set "reingest on same
MARC" to TRUE and update the target authority record by setting
deleted = FALSE (which propagates the "changes" to the linked
bib records), then set "reingest on same MARC" flag back to its
original value.

This has the bonus of actually working.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@18567 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/011.schema.authority.sql
Open-ILS/src/sql/Pg/0454.function.authority_merge_records.sql [new file with mode: 0644]