anchor.diff:      binary_to_term(base64:decode(Term));
   decode_record(Term, Type) ->
       error({invalid_json_structure, Term, Type}).
  -
  -
  -
  -%%--------------------------------------------------------------------
  -%% @doc
  -%% Returns current model name base on defined model-name changes.
  -%% @end
  -%%--------------------------------------------------------------------
  --spec maybe_rename_model(RecordType :: model_behaviour:model_type(), RecordVersion :: record_version()) ->
  -    model_behaviour:model_type().
  -maybe_rename_model(RecordType, RecordVersion) ->
  -    case maps:get(RecordType, ?MODULE:get_renamed_models(), undefined) of
  -        {RenamedVersion, RenamedTargetModel} when RenamedVersion >= RecordVersion ->
  -            RenamedTargetModel;
  -        _ ->
  -            RecordType
  -    end.
  
positive.code: -spec decode_record_vcs(ejson()) -> {WasUpdated :: boolean(), record_version(), term()}.
  decode_record_vcs({Term}) when is_list(Term) ->
      {Version, Record} = decode_record({Term}),
      ModelName0 = element(1, Record),
      ModelName = maybe_rename_model(ModelName0, Version),
      #model_config{version = TargetVersion} = ModelName:model_init(),
      {NewVersion, NewRecord} = record_upgrade(ModelName, TargetVersion, Version, Record),
      {Version /= NewVersion, NewVersion, NewRecord}.
  
negative.code: -include("modules/datastore/datastore_common.hrl").
  -include("modules/datastore/datastore_common_internal.hrl").
  -include("modules/datastore/datastore_models_def.hrl").
  
  
  %%%===================================================================
  %%% Definitions
  %%%===================================================================
  
  %% Encoded record name field
  -define(RECORD_TYPE_MARKER, "<record_type>").
  
  %% Encoded record version field
  -define(RECORD_VERSION_MARKER, "<record_version>").
  
  
  %%%===================================================================
  