code: function(instance, opt){
        var previousVersion = instance._previousDataValues;
        var currentVersion = instance.dataValues;
  
        // Disallow change of revision
        instance.set(options.revisionAttribute, instance._previousDataValues[options.revisionAttribute]);
  
        // Get diffs
        var diffs = getDifferences(previousVersion, currentVersion, options.exclude);
  
        if(diffs && diffs.length > 0){
           instance.set(options.revisionAttribute, (instance.get(options.revisionAttribute) || 0) + 1);
           if(!instance.context){
              instance.context = {};
           }
           instance.context.diffs = diffs;
        }
     }
docs: Before create/update augment revision