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

Delete handling in prune changes job assumes lower ID values are further back in time #35

Open
JamesDPC opened this issue Aug 15, 2022 · 0 comments

Comments

@JamesDPC
Copy link

While this is probably OK to assume for nearly all cases, there could exist a situation where an ID of 500 is more recent than an ID of 1000.

The query should instead just delete records prior to the pruneBefore value. This would require the Created column in the DataChangeRecord table have an index applied to it.

$query = new SQLDelete('DataChangeRecord', '"ID" < \'' . $max . '\'');

I'll knock up a PR for review, at some point.

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

No branches or pull requests

1 participant