https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10517
--- Comment #28 from David Cook <dc...@prosentient.com.au> --- (In reply to Rudolf Byker from comment #25) > OK, if you really need to support older versions, let's do it cleanly. Here > is a way to check if the user exists: > > EXISTS=$(mysql -uroot -p -s -e "select count(*) from mysql.user where user = > 'asdf'" | tail -n 1) > if [[ $EXISTS -gt 0 ]] > then > echo "Now delete the user." > fi Sounds like a plan to me, although I think it would be better to create a new function in koha-functions.sh, since we need to drop the user in koha-restore as well as koha-remove. I think we batch too many SQL statements together for these CLI utilities. But, I'm not planning on doing that work anytime soon. So don't feel obligated to listen to that. Ultimately what I was trying to say before was that koha-remove already uses the DROP USER IF EXISTS syntax, so it seems fair to use it in koha-restore too, even if it causes problems for people using older DB versions, since that problem already exists in the master codebase. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/