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

Fix remove old version #9

Merged
merged 1 commit into from
Mar 19, 2020
Merged

Conversation

thewebartisan7
Copy link
Contributor

You will never delete all versions if take($keep) it's used.

I change to ->take(PHP_INT_MAX) so that it take all records apart first that is skipped.

I didn't find a better solution to set limit to "all records".

The issue happen if you change keep max versions after already exist some versions.

For example you start with max 10, and then you change to max 3, then you will never delete older versions that was already saved before change config.

I hope that I explain well myself.

You will never delete all versions if take($keep) it's used.

 I change to ->take(PHP_INT_MAX) so that it take all records apart first that is skipped.

I didn't find a better solution to set limit to "all records".

The issue happen if you change keep max versions after already exist some versions.

For example you start with max 10, and then you change to max 3, then you will never delete older versions that was already saved before change config.

I hope that I explain well myself.
@overtrue overtrue merged commit 120d038 into overtrue:master Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants