@uok opened this Issue on April 25th 2021

FAQ: https://matomo.org/faq/how-to/faq_20184/
Section "Delete visits using SQL query"
Code "delete all data for a given website"

After running the code with e.g. log_visit.idsite = 1, everything is deleted from all tables except entries in table log_action.
There are many entries left that belong to this site. How can I delete them?
From what I can understand is that info is linked via idaction_name and idaction_url to this table.

What is the correct SQL code for this task?

It would be a lot better, if after a user deletes a website from Matomo GUI also the log data, reports, etc. are deleted from the database. I did not expect the need for this manual step after confirming "Deleting a website will delete all log data that has been collected for it. This action is permanent and cannot be undone." in the GUI.

@flamisz commented on April 27th 2021 Contributor

Hi @uok, thanks for creating this issue. I tested the SQL and indeed it does not emptying the log_action table, just deletes rows from it.

It's not a code related issue, I will discuss with the team what is the best way to solve this so we can hopefully get things sorted and working for you.

@uok commented on June 3rd 2021

@flamisz , can you please provide SQL commands for fixing? Thanks!

@flamisz commented on June 3rd 2021 Contributor

Hi @uok,

unfortunately, currently, we can't provide an SQL command that emptying log_action table with the others.

Powered by GitHub Issue Mirror