Eva
Eva2w ago

This isn’t Convex-specific but curious

This isn’t Convex-specific but curious for opinions! What is the best practice for versioning documents? I have a rich text field and would like to save submissions in history for comparison and reversion.
1 Reply
ari
ari2w ago
If you have an index on say, (document_owner, document_name, _creationTime), you could treat your table as a log with _creationTime being the version. That comes with the benefit of not needing to keep track of the time of the revision yourself -- of course assuming the mutation is saved around the same time that the update happened (i.e. not scheduled). If you want to keep track of incremental versions, adding a new field for that would likely be pretty easy

Did you find this page helpful?