Override default db error handling in upgrade.php (fixes #481)

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>