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

When a website is deleted, it should be "soft deleted" rather than completely deleted #12368

Closed
mattab opened this issue Dec 17, 2017 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.

Comments

@mattab
Copy link
Member

mattab commented Dec 17, 2017

Currently:

  1. when a site is deleted we do not actually delete the log_ records for this site, ie. we keep all historical RAW data
  2. when a website is deleted, we delete the row completely from the site table.

so 1) is fine and by design, but 2) is not good enough, as it leads to "orphaned" RAW data logs where we don't know which website the logs (used to) refer to.

-> Instead we should use a soft delete where the row would have a flag deleted=1.

This would make the database represent the real state of the data and be more consistent with our newer practises (ie. soft deletes are used for Goals / Funnels / Forms / Heatmaps / Sessions / Scheduled reports / Segments)

@mattab mattab added the c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. label Dec 17, 2017
@mattab
Copy link
Member Author

mattab commented May 14, 2018

see also #12907 When website has been deleted, we should also delete the raw data for this website

@mattab
Copy link
Member Author

mattab commented Jul 1, 2019

When a website is deleted, we now also delete the RAW data. So this issue is not really needed.
Instead see: #2121
and #9181

@mattab mattab closed this as completed Jul 1, 2019
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
Projects
None yet
Development

No branches or pull requests

1 participant