[Koha-bugs] [Bug 20271] Merge deleted biblio, biblioitems, biblio_metadata, and items tables

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 30 17:41:48 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20271

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--- Comment #224 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
I submitted my work to the mentioned branch [1]

What I tested was:
- Do a reset_all on master
- Run updatedatabase on that branch
- Tested adding biblios/items and deleting them works without changes.
- Rebuilding zebra
- Tests need to pass

I fixed the API so it acknowledges the new deleted_on and deleted fields.
Fetching items should keep the current behaviour (no deleted items retrieved by
default, we could add the feature later if we wanted to be able to retrieve
them).

I noticed we merge the tables and now have a WHERE condition all over the
place, that has an impact on performance, unless we have an index for the
compared columns. As we are not making real use of the date the record was
deleted, I made sure the index is created against a boolean (size, probably
speed) so I changed all item-related queries to do

items.is_current=1 instead of items.deleted_on IS NULL
items.is_current=0 instead of items.deleted_on IS NOT NULL

and for biblios:

biblio.deleted=0 instead of biblio.deleted_on IS NULL
biblio.deleted=1 instead of biblio.deleted_on IS NOT NULL

I put my signature on this patchset as-is, but am still checking the atomic
update edge cases.

[1] https://gitlab.com/thekesolutions/Koha/-/commits/qa_20271

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list