Fixed DB migration error handler