UPDATE biblio_metadata SET record_source_id='your source id' WHERE biblionumber=1;
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37419 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 169823 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169823&action=edit Bug 37419: Update FK constraint on record sources to avoid data loss Without this patch, deleting a record source will delete the associated biblio_metadata rows, which is a severe data loss. This patch makes the constraint restrict this action. To test: 1. Add a record source 2. Set the record source to some records $ koha-mysql kohadev 3. Delete the record source => FAIL: Record metadata deleted 4. Apply this patch 5, Run: $ ktd --shell k$ updatedatabase => SUCCESS: DB update goes well 6. Repeat 1~3 with another record => SUCCESS: Source cannot be deleted if there are linked records Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.