这是indexloc提供的服务,不要输入任何密码
Skip to content

Create a Revision When Document data Changes #399

@DennisAlund

Description

@DennisAlund

Description:

Implement a system to create a revision every time the data object in a document changes. The revisions will be stored in a sub-collection, providing a clear history of changes and aiding in tracking and auditing document modifications.

Objectives:

  • Revision Path:

    • Store revisions at the path tanam-documents/{docId}/revisions/{id}.
  • Timestamp:

    • Include a createdAt timestamp to record when the revision was created.
  • Revision Counter:

    • Maintain an ever-incrementing counter for the revision number, derived from the parent document's current revision number incremented by one.
  • Data Field:

    • Store the document's data in a field called data.
  • Read-Only Access:

    • Ensure the revision documents are read-only for all users.

Benefits:

  • Provides a clear history of document changes.
  • Enhances tracking and auditing capabilities.
  • Ensures data integrity and security by maintaining read-only revisions.

Acceptance Criteria:

  • Revisions are stored at the path tanam-documents/{docId}/data/revision/{id}.
  • Each revision contains a createdAt timestamp.
  • Each revision includes an ever-incrementing revision number.
  • The document's data is stored in a field called data.
  • Revision documents are read-only for all users.

Notes:

  • Ensure robust error handling and logging during the revision creation process.
  • Thoroughly test the revision system to confirm consistency and reliability.
  • Update documentation to reflect the new revision system and handling processes.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Ready

Relationships

None yet

Development

No branches or pull requests

Issue actions