UPDATE biblio_metadata SET record_source_id='your source id' WHERE biblionumber=1;
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37419 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169827|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 169932 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169932&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> Signed-off-by: Janusz Kaczmarek <januszop@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.