Bug 18284: (bug 17196 follow-up) Move biblio metadata when a biblio is deleted
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 16 Mar 2017 18:20:10 +0000 (15:20 -0300)
committerBrendan A Gallagher <brendan@bywatersolutions.coml>
Wed, 22 Mar 2017 10:26:05 +0000 (10:26 +0000)
commit36ee625f0890c80190e53f59bbb2282c3b2bfcb5
tree06d7fb9f0111a3053c56445edbd96ea6cbf7aa68
parent9d8e83528f39a2d8401f7ed50888c595f48205f5
Bug 18284: (bug 17196 follow-up) Move biblio metadata when a biblio is deleted

There is a deletedbiblio_metadata table but it is not populated when a
biblio is deleted. Since we have a ON DELETE constraint on
biblio_metadata.biblionumber, the row is deleted when the biblio entry
is deleted => data lost!

Test plan:
- Create a biblio
- Delete it

=> Without this patch the deletedbiblio_metadata table is not populated
with the biblio_metadata row related to the biblio

=> With this patch applied you should see that the row has been moved.

Followed test plan, behaves as expected
Signed-off-by: Marc VĂ©ron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.coml>
C4/Biblio.pm
t/db_dependent/Biblio.t