lib/services/upgrade.js
function saveTransformedData(uri) {
  return function (data) {
    return db.put(uri, JSON.stringify(data))
      .then(function () {
        // If the Promise resolves it means we saved,
        // so let's return the data
        return data;
      });
  };
}
function saveTransformedData(uri) {
  return function (data) {
    return db.put(uri, JSON.stringify(data))
      .then(function () {
        // If the Promise resolves it means we saved,
        // so let's return the data
        return data;
      });
  };
}
function saveTransformedData ( uri ) { return function ( data ) { return db . put ( uri , JSON . stringify ( data ) ) . then ( function ( ) { // If the Promise resolves it means we saved, // so let's return the data return data ; } ) ; } ; }
The data that was upgraded needs to be saved so that
we never need to upgrade again. Send it to the DB before
returning that data.

@param  {String} uri
@return {Function}
The data that was upgraded needs to be saved so that we never need to upgrade again . Send it to the DB before returning that data .