-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Optionally create initial version of model #53
Conversation
Add create_initial_versions config
@overtrue I have added another commit. It adds a new config The reason for adding this option was this issue: Here is a screenshot from a plugin i am currently working on. |
https://github.com/overtrue/laravel-versionable?tab=readme-ov-file#custom-version-store-strategy Does this fulfill your needs? |
Ah sounds like that would do it. |
Yes, changing Version Strategy already does that. Thanks for time :) |
Good! |
Should i push a commit by removing last commit changes? |
Yes, please. thanks. |
Just realised the Snapshot version strategy saves all the model attributes instead of saving on the ones specified using: |
I think this is because of
It should be Or we can even add a completely new strategy to do that? |
This pull request adds support for optionally creating a version for the initial/existing state of the model.
It fixes the issue: #51