Fix core:purge-old-archive-data failing in some cases #12757
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If tables with names like
piwik_archive_numeric_1875_09
exist for any reason, the archive purger will fail, as the date information in the name couldn't be used to create aDate
object...I'm not 100% sure why such tables could have been created in the first place, but maybe we had a bug in the archiving sometimes that allowed triggering the archiving for any date given? Wasn't able to do so locally with current version.
fixes #11778