@@ -423,6 +423,8 @@ func (r *Ref) SaveFile(ctx context.Context) error {
423
423
db := datastore .GetStore ().GetTransaction (ctx )
424
424
//"type": r.Type, at first
425
425
//"created_at": r.CreatedAt, before updated_at
426
+ //"updated_at": r.UpdatedAt, Before deleted_at
427
+ //"deleted_at": r.DeletedAt, Before chunk_size
426
428
//"mimetype": r.MimeType, After Actual File Hash and Before Write Marker
427
429
err := db .Model (& Ref {}).Where ("id = ?" , r .ID ).Updates (map [string ]interface {}{
428
430
"allocation_id" : r .AllocationID ,
@@ -448,8 +450,6 @@ func (r *Ref) SaveFile(ctx context.Context) error {
448
450
"encrypted_key" : r .EncryptedKey ,
449
451
"attributes" : r .Attributes ,
450
452
"on_cloud" : r .OnCloud ,
451
- "updated_at" : r .UpdatedAt ,
452
- "deleted_at" : r .DeletedAt ,
453
453
"chunk_size" : r .ChunkSize ,
454
454
}).Error
455
455
if err != nil {
@@ -465,6 +465,8 @@ func (r *Ref) SaveDir(ctx context.Context) error {
465
465
//"mimetype": r.MimeType, After Actual File Hash and Before Write Marker
466
466
//"actual_file_size": r.ActualFileSize, After Merkle Root And Before Actual File Hash
467
467
//"actual_file_hash": r.ActualFileHash, After Actual File Hash And Before Write Marker
468
+ //"updated_at": r.UpdatedAt, Before deleted_at
469
+ //"deleted_at": r.DeletedAt, Before chunk_size
468
470
err := db .Model (& Ref {}).Where ("id = ?" , r .ID ).Updates (map [string ]interface {}{
469
471
"allocation_id" : r .AllocationID ,
470
472
"lookup_hash" : r .LookupHash ,
@@ -487,8 +489,6 @@ func (r *Ref) SaveDir(ctx context.Context) error {
487
489
"encrypted_key" : r .EncryptedKey ,
488
490
"attributes" : r .Attributes ,
489
491
"on_cloud" : r .OnCloud ,
490
- "updated_at" : r .UpdatedAt ,
491
- "deleted_at" : r .DeletedAt ,
492
492
"chunk_size" : r .ChunkSize ,
493
493
}).Error
494
494
if err != nil {
0 commit comments