Enable merge of authority records to do the right thing
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Nov 2010 02:47:47 +0000 (02:47 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Nov 2010 02:47:47 +0000 (02:47 +0000)
commitaad819b6b7728e0d1fe3f7cadb128654b197707e
tree3ec2bc4553e6ea211832a4a6532d409d783d0398
parent10e9d4886c8732afe4e2c660d256108c626b5377
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/branches/rel_2_0@18568 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]