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

Limit Smallest Viewable Changeset to Checkpoint #14

Open
kfriars opened this issue Jul 18, 2022 · 0 comments
Open

Limit Smallest Viewable Changeset to Checkpoint #14

kfriars opened this issue Jul 18, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@kfriars
Copy link
Contributor

kfriars commented Jul 18, 2022

Currently we are supporting the ability to view the database at any point in time, which has a few side effects:

  1. Model events do not behave totally intuitively
  • Creating/Created + Saving/Saved get fired several times during a single updated for example
  • The context which relates a model between between ing events and ed events is lost during revisioning process.
  1. Long CRUD operation times when many cascading revisions need to be created
  2. Consuming applications and other packages will likely need to account for checkpoint's presence

To address only point (1) from above, we can add a helper/service in the container which would provide revisioning context on a given model.

The longer term solution would be to remove the revisioning process from occurring during the model event lifecycle, and instead perform all revisioning when creating a new checkpoint. The key benefit of this, is that checkpoint does not inject itself into the normal Laravel model event lifecycle.

A further consideration would be to duplicate revisioned tables when creating new checkpoints instead of storing revision information on the revisions table. This would have the key benefit of making existing unique constraints behave correctly as well as keeping the table size low.

@kfriars kfriars added the enhancement New feature or request label Jul 18, 2022
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