[open-ils-commits] r15881 - branches/rel_1_6/Open-ILS/src/sql/Pg (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 17 15:15:51 EDT 2010
Author: miker
Date: 2010-03-17 15:15:46 -0400 (Wed, 17 Mar 2010)
New Revision: 15881
Modified:
branches/rel_1_6/Open-ILS/src/sql/Pg/010.schema.biblio.sql
Log:
delete the metarecord link for "deleted" records
Modified: branches/rel_1_6/Open-ILS/src/sql/Pg/010.schema.biblio.sql
===================================================================
--- branches/rel_1_6/Open-ILS/src/sql/Pg/010.schema.biblio.sql 2010-03-17 19:14:39 UTC (rev 15880)
+++ branches/rel_1_6/Open-ILS/src/sql/Pg/010.schema.biblio.sql 2010-03-17 19:15:46 UTC (rev 15881)
@@ -48,7 +48,7 @@
CREATE INDEX biblio_record_entry_fp_idx ON biblio.record_entry ( fingerprint );
CREATE UNIQUE INDEX biblio_record_unique_tcn ON biblio.record_entry (tcn_value) WHERE deleted IS FALSE;
-CREATE RULE protect_bib_rec_delete AS ON DELETE TO biblio.record_entry DO INSTEAD UPDATE biblio.record_entry SET deleted = TRUE WHERE OLD.id = biblio.record_entry.id;
+CREATE RULE protect_bib_rec_delete AS ON DELETE TO biblio.record_entry DO INSTEAD (UPDATE biblio.record_entry SET deleted = TRUE WHERE OLD.id = biblio.record_entry.id; DELETE FROM metabib.metarecord_source_map WHERE source = OLD.id);
CREATE TABLE biblio.record_note (
More information about the open-ils-commits
mailing list