Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 1 Dec 2017 12:47:59 +0000 (12:47 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Dec 2017 13:09:50 +0000 (10:09 -0300)
commitdaf9d619e5932fce9fe108a72a48450228feb5e6
tree54f5a6a2fd0a786fe21a5cafca514dce8f0db749
parent0d828094e8e12a5c8ee814044a46bafb9897a552
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
We need to know the last modification time of the MARC record for some
features (like OAI-PMH parameters 'from' and 'until' for instance)

This patch only adds the missing column in biblio_metadata and
deletedbiblio_metadata

Test plan:
1. Run updatedatabase.pl
2. Verify that both tables have the new column, its value should be the
   greatest timestamp value from the corresponding biblio and
   biblioitems table entries
   You can verify with the following SQL query:
     SELECT b.biblionumber, b.timestamp as biblio_ts,
     bi.timestamp as biblioitems_ts, m.timestamp as biblio_metadata_ts
     FROM biblio_metadata m
     LEFT JOIN biblioitems bi ON (bi.biblionumber = m.biblionumber)
     LEFT JOIN biblio b ON (b.biblionumber = m.biblionumber);

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/atomicupdate/bug_19724.perl [new file with mode: 0644]
installer/data/mysql/kohastructure.sql