Feature Request
Description:
Implement a versioning system for MatViewDefinition. Every time a view's SQL is changed, a new version should be saved, allowing users to view the history of changes and roll back to a previous version.
Use Case:
If a change to a view's SQL introduces an error or performance regression, developers need an easy way to revert to a previously known good version.
Proposed Solution:
- Integrate a gem like
paper_trail with the MatViewDefinition model.
- In the Admin UI, add a 'History' tab to the view's page that shows the version history.
- Add a 'Rollback' button to restore a previous version.
RSpec Tests:
- Update a
MatViewDefinition and verify that a new version is created in paper_trail.
- Test the rollback mechanism, ensuring that the model's attributes are restored to the previous version's state.
- (UI) Visit the history tab and verify the list of versions. Click rollback and verify the main definition is updated.
Checklist:
Feature Request
Description:
Implement a versioning system for
MatViewDefinition. Every time a view's SQL is changed, a new version should be saved, allowing users to view the history of changes and roll back to a previous version.Use Case:
If a change to a view's SQL introduces an error or performance regression, developers need an easy way to revert to a previously known good version.
Proposed Solution:
paper_trailwith theMatViewDefinitionmodel.RSpec Tests:
MatViewDefinitionand verify that a new version is created inpaper_trail.Checklist: