Skip to content

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

@JamesDPC

Description

@JamesDPC

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions