[Koha-bugs] [Bug 20271] Merge deletedbiblio* and deleteitems tables with their "alive" cousins

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 15 11:41:07 CET 2018


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

--- Comment #13 from Francesco Rivetti <oha at oha.it> ---
(In reply to Jon Knight from comment #12)
> Just a random thought to throw into this: would it be worth creating
> database views to replicate the old tables based on the new ones?  That way
> if any installations have pre-existing reports that use the old tables in
> their queries, they will still continue to work.
> 
> For example something like this:
> 
> CREATE VIEW old_issues AS SELECT * FROM issues WHERE deleted_at IS NOT NULL;

I thought about it, but you most likely need the view for "issues" than
"old_issues", which means:

RENAME TABLE issues TO all_issues;
CREATE VIEW issues AS SELECT * FROM issues WHERE delted_at IS NULL;

but then, more code will need to be changed for updates/insert/deletes

OTOH, most reports UNION issues with old_issues, might be smart to take this
opportunity to simplify them?

(note, this applies to deleteditems/biblios as well)

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


More information about the Koha-bugs mailing list