fix upgrade queue tables

The passed parameter is always table name. The logic was wrong. https://issues.cask.co/browse/CDAP-894