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