anchor.diff:  -spec record_upgrade(model_behaviour:model_type(), record_version(), record_version(), term()) ->
       {record_version(), term()}.
   record_upgrade(ModelName, TargetVersion, CurrentVersion, Record) when TargetVersion > CurrentVersion ->
  -    {NextVersion, NextRecord} = ModelName:record_upgrade(CurrentVersion, Record),
  +    {NextVersion, NextRecord} = ModelName:upgrade_record(CurrentVersion, Record),
       case NextVersion > CurrentVersion of
           true ->
               record_upgrade(ModelName, TargetVersion, NextVersion, NextRecord);
  
positive.code: %%--------------------------------------------------------------------
  -spec decode_record(ejson()) -> {record_version(), term()}.
  decode_record({Term}) when is_list(Term) ->
      ModelName0 = decode_record(proplists:get_value(<<?RECORD_TYPE_MARKER>>, Term), atom),
      Version = decode_record(proplists:get_value(<<?RECORD_VERSION_MARKER>>, Term), integer),
      ModelName = maybe_rename_model(ModelName0, Version),
      {record, Fields} = ModelName:record_struct(Version),
      {Version, decode_record({Term}, {record, Version, Fields})}.
  
  %%--------------------------------------------------------------------
  
negative.code: -spec decode_record_vcs(ejson()) -> {WasUpdated :: boolean(), record_version(), term()}.
  decode_record_vcs({Term}) when is_list(Term) ->
      {Version, Record} = decode_record({Term}),
      ModelName = element(1, Record),
      #model_config{version = TargetVersion} = ModelName:model_init(),
      {NewVersion, NewRecord} = record_upgrade(ModelName, TargetVersion, Version, Record),
      {Version /= NewVersion, NewVersion, NewRecord}.
  