The user document currently includes an activity should field listing the last time that the user have read each document. This information allows to distinguish between read and unread documents. It could be convenient to move this field in a separate document for each diary.
Two reasons motivate this change. When a user reads a lot of documents, her/his user document becomes heavy (> 1Mo), which slows navigation down. Moreover, this change would be more compatible with partition databases (if Cassandre finally adopt this design).
The required changes includes:
The existing activity fields should be moved from user documents to diary_user document. Given the user activity is currently not organized by diary, this transitional feature requires to filter the user activity with the list of memos from each diary. This move and filtering could be triggered when the user connect to a diary that do not include diary_user document yet.
The view/list emitting activity should be based on the diary_user document (instead of the user document).
The track function should modify the diary_user document (instead of the user document).
The user document currently includes an
activity
should field listing the last time that the user have read each document. This information allows to distinguish between read and unread documents. It could be convenient to move this field in a separate document for each diary.Two reasons motivate this change. When a user reads a lot of documents, her/his user document becomes heavy (> 1Mo), which slows navigation down. Moreover, this change would be more compatible with partition databases (if Cassandre finally adopt this design).
The required changes includes:
activity
fields should be moved from user documents todiary_user
document. Given the user activity is currently not organized by diary, this transitional feature requires to filter the user activity with the list of memos from each diary. This move and filtering could be triggered when the user connect to a diary that do not includediary_user
document yet.activity
should be based on thediary_user
document (instead of the user document).diary_user
document (instead of the user document).