[Koha-bugs] [Bug 20271] Merge deleted biblio, biblioitems, biblio_metadata, and items tables with their "alive" cousins

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 27 15:37:32 CEST 2018


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

Josef Moravec <josef.moravec at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #76256|0                           |1
        is obsolete|                            |
  Attachment #76257|0                           |1
        is obsolete|                            |
  Attachment #76258|0                           |1
        is obsolete|                            |
  Attachment #76259|0                           |1
        is obsolete|                            |
  Attachment #76260|0                           |1
        is obsolete|                            |
  Attachment #76261|0                           |1
        is obsolete|                            |
  Attachment #76262|0                           |1
        is obsolete|                            |
  Attachment #76263|0                           |1
        is obsolete|                            |
  Attachment #76264|0                           |1
        is obsolete|                            |
  Attachment #76265|0                           |1
        is obsolete|                            |
  Attachment #76266|0                           |1
        is obsolete|                            |
  Attachment #76267|0                           |1
        is obsolete|                            |
  Attachment #76268|0                           |1
        is obsolete|                            |
  Attachment #76269|0                           |1
        is obsolete|                            |
  Attachment #76270|0                           |1
        is obsolete|                            |
  Attachment #76271|0                           |1
        is obsolete|                            |
  Attachment #76272|0                           |1
        is obsolete|                            |
  Attachment #76273|0                           |1
        is obsolete|                            |
  Attachment #76274|0                           |1
        is obsolete|                            |
  Attachment #76275|0                           |1
        is obsolete|                            |
  Attachment #76276|0                           |1
        is obsolete|                            |
  Attachment #76277|0                           |1
        is obsolete|                            |

--- Comment #159 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 76493
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76493&action=edit
Bug 20271: merging delete biblio/items

The present bug merges the following tables:
deletedbiblio          -> biblio
deletedbiblioitems     -> biblioitems
deletedbiblio_metadata -> biblio_metadata
deleteditems           -> items

and adds a column deleted_at to signify time of deletion, if deleted

it replaces all occurrences of the mentioned occurences and uses
of mentioned deleted* tables

upgrade is handled by moving rows from deleted* tables to the live
ones. If all rows are moved, the corresponding tables are dropped.
If there are duplicates or conflicts (duplicate barcodes e.g.) they
reminders are left for scrutiny and table renamed to _deleted*

Test plan:

1) Make sure you have a db with at least a few deleted biblios,
   biblioitems and items.
2) Apply patch and run updatedatabase.pl
3) Make note of the db upgrade messages, if you get a message like:
   There were x deleteditems that could not be moved, please check
_deleteditems
   you should check the _deleteditems table and verify that they are
   actual conflicts
4) Click around in the web interface and make sure you can delete items
   and biblios
5) "Undelete" an item by NULLing the deleted_at column for an item
   and verify that it returns in interface (Not neccessary really)

Signed-off-by: Brendan A Gallagher <brendan at bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

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

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


More information about the Koha-bugs mailing list