Ooops.. I introduced a series of these during my tenure as RM..
Created attachment 101887 [details] [review] Bug 24994: Correct DB Updates
I corrected the cases I introduced in this patch..
Tomas, why did you suggest that? I cannot remember why we should not use "DROP IF EXISTS" If we go that way, we need: * a guideline (and explain why) * a check to the QA script See also https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7902#c3
Even if we choose to stick to IF EXISTS it may be nice to add a QA script check for both ADD TABLE (IF NOT EXISTS) and DROP TABE (IF EXISTS).. I know I've missed those on occasions myself.. I don't remember there being a QA check for it as yet (probably because we had the TableExists function as an option).
(In reply to Jonathan Druart from comment #3) > Tomas, why did you suggest that? > I cannot remember why we should not use "DROP IF EXISTS" > > If we go that way, we need: > * a guideline (and explain why) > * a check to the QA script > > See also https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7902#c3 I pointed a case of table creation. Maybe my comment was too generic. I have no opinion on the drop case.
DROP IF EXISTS could be bad for features we backported that include tables. The data would be lost.
Created attachment 104846 [details] [review] Bug 24994: Correct DB Updates Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 104895 [details] [review] Bug 24994: Correct DB Updates Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
backported to 19.11.06