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

--- Comment #18 from Katrin Fischer <[email protected]> ---
(In reply to Agustín Moyano from comment #15)
> Great job Katrin.. if I may add a comment, in the atomic update, if there
> are some budget periods that were not found, instead of not adding the FK
> constraint, I would:
> 
> 1. Create a temporary table.. something like _bug_18050_aqbudgets where I
> would copy the offending rows
> 
> 2. Update aqbudgets.budget_period_id to null, add the FK constraint
> 
> 3. Emit the warning that some budget periods where not found, and a copy of
> those rows where preserved in _bug_18050_aqbudgets table
> 
> If it's ok to you, I can add a follow-up with those steps

Hi Augustin, 

it's not as simple as that I am afraid. If there are orphan aqbudgets, there
could also be orders attached to them. And if there are orders, there could be
linked items... the rabbit hole is deeper.

Maybe another better approach could be to go the other direction: We add a
aqbudgetperiods entry - this would also allow the library to deal with things
in the GUI.

I am not sure I am able to write that one, so if anyone beats me to it I'd be
more than happy.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://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