morganthomas / Shpadoinklekasten-lib

Other
0 stars 1 forks source link

Keep the full history of operations done in the database #22

Open morganthomas opened 4 years ago

morganthomas commented 4 years ago

This should be done in a single collection using a BSON representation of operations in the Zettel algebra, but also some of the history should be reflected in the Zettel. The rule here should be that we can destructively edit structure (i.e. relations) in the Zettel but we can't destructively edit content in the Zettel. The operations are not ever truly destructive because they are isomorphisms and they are recorded and therefore undoable. But content (as opposed to relations) can't be changed, only added. Content consists of comments, thread titles, and category titles. Comments can be edited by adding to the edit history. Relations consist of: the fact of a comment being in a thread, the fact of a comment coming before another comment in a thread, the fact of a thread being in a category, the fact of a category being trashed or non-trashed, and the existence of a relation.