fix table resolver to change db on selective upgrades