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

            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
          Assignee: koha-bugs@lists.koha-community.org
          Reporter: boutrosboutrosbout...@gmail.com
        QA Contact: testo...@bugs.koha-community.org

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,
messages.

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
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to