[Koha-bugs] [Bug 18050] Missing constraint on aqbudgets.budget_period_id in aqbudgets

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 2 11:47:28 CEST 2020


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

--- Comment #12 from Julian Maurice <julian.maurice at biblibre.com> ---
(In reply to Katrin Fischer from comment #11)
> (In reply to Julian Maurice from comment #10)
> > I think there is something wrong here: if database contains orphan budget,
> > the updatedatabase will warn about it and go on.
> > One can see the warning and fix it, but there will be no easy way to re-run
> > the update,
> > or one can miss the warning and continue using koha with a wrong schema.
> > 
> > That's not the first time I see this pattern, and I think there is a problem
> > with that. What's the point of updatedatabase if it doesn't ensure that the
> > schema is correct at the end ?
> > I think the updatedatabase should just die here, let the admin fix the
> > problem and re-run the updatedatabase process.
> 
> We cannot do anything else in this case. When there are orphan funds (not
> budget here), then there might be orders linked to this fund - we cannot
> just delete them. We need to leave it up to the library to fix this. 
> 
> Our updatedatabase mechanism doesn't allow to stop and rerun (as far as I
> know?) and I think using the existing pattern with a warn is the best we can
> do here right now and it should not be put on this bug report to fix the
> underlying issue :)

Can't we just die ?
In an atomic update file it won't stop the process because the file is eval'd,
but once it is in updatedatabase.pl it can stop the process.
And if we die before changing the Version in systempreferences, next time
updatedatabase is run it will restart from where it died.

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


More information about the Koha-bugs mailing list