Skip to content

Implement HasRevision Utility Functions #2

Open
@m-triassi

Description

@m-triassi

Overview

There are a number of stub functions that need to be implemented in the HasRevisions trait. Currently they are some stubs that can be elaborated on.

Details

The functions that are stubbed are as follows: rollbackToRevision, revertToRevision, deleteAllRevisions with some comments but more specifically.

  • rollbackToRevision: Should iterate through all the revisions between the passed revision and current, and delete them all. This will effectively rollback to the given revision

  • revertToRevision: Should save the given model as a revision to effectively restore that model as the new current revision of that instance while maintaining the revision history before it.

  • deleteAllRevisions: Delete all the revisions for a given model. effectively acting as a force delete - potentially rename?

Additionally, and probably most importantly we should add a insertRevisionAfter

  • insertRevisionAfter: allow for a new revision of an object to be placed into the lineage of a model instance. Ie; given an new revision place it after a chosen revision

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions