Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Database table view cell value adds `createdAt` and `updatedAt` fields https://github.com/siyuan-note/siyuan/issues/10492

Daniele487897b54c0
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index a10c07edf8..8d714ad9b4 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -2594,12 +2594,15 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
}
}
+ now := time.Now().UnixMilli()
if nil != blockVal {
- blockVal.Block.Updated = time.Now().UnixMilli()
+ blockVal.Block.Updated = now
+ blockVal.UpdatedAt = now
if isUpdatingBlockKey {
blockVal.IsDetached = val.IsDetached
}
}
+ val.UpdatedAt = now
key, _ := attrView.GetKey(val.KeyID)
if nil != key && av.KeyTypeRelation == key.Type && nil != key.Relation {