Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement HasRevision Utility Functions #2

Open
4 tasks
m-triassi opened this issue Nov 16, 2020 · 0 comments
Open
4 tasks

Implement HasRevision Utility Functions #2

m-triassi opened this issue Nov 16, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@m-triassi
Copy link
Contributor

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
@m-triassi m-triassi added the enhancement New feature or request label Nov 16, 2020
@m-triassi m-triassi self-assigned this Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant