Bug ID: 20271
           Summary: Merge deleted/old tables with their "alive" cousins
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1 - high
         Component: Database
        QA Contact:

In Koha's DB, instead of having a "soft" deletion of entries by flagging the
deleted one as so, the rows in the db is actually deleted, but only after a new
row in a different table is inserted.

Koha's DB is relational, so there is a cascade of links between each object: a
biblio is referred by many items, and each item is referred by issues, holds,

E.g.: when a row in the item table is moved from "items" to "deleted_items",
then all the references from holds, transfers and so on will be broken.

The suggested more orthodox approach to this would be to add a "deleted_at"
column, which is normally null unless the row is deleted, then it set to the
timestamp of when it was deletion.

This means that the row is still there and will still be referred by other
tables, but it just won't be shown in the relevant lists.

This would improve the maintenance of Koha in many ways (e.g.: the
auto_increment id on those tables caused lots of issues when you add an item
and delete it immediately after. the next new item will have the same
itemnumber as the previously deleted one, clashing with it in many ways).

This bug is about merging the all these tables:
deletedborrowers       => borrowers
deletedbiblio          => biblio
deletedbiblioitems     => biblioitems
deletedbiblio_metadata => biblio_metadata
deleteditems           => items
old_issues             => issues
old_reserves           => reserves

You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
Koha-bugs mailing list
website :
git :
bugs :

Reply via email to