-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
platform:backendBackend / cloud functionsBackend / cloud functionspriority:low 🏖️Low priority issueLow priority issuetype:enhancement 😃New feature or requestNew feature or request
Milestone
Description
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}
.
- Store revisions at the path
-
Timestamp:
- Include a
createdAt
timestamp to record when the revision was created.
- Include a
-
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
.
- Store the document's data in a field called
-
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
Labels
platform:backendBackend / cloud functionsBackend / cloud functionspriority:low 🏖️Low priority issueLow priority issuetype:enhancement 😃New feature or requestNew feature or request
Type
Projects
Status
Ready