This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
MySQL error when hard deleting a volume with a folder structure more than 15 levels deep #8073
Labels
You can continue the conversation there. Go to discussion →
Description
https://dev.mysql.com/doc/refman/8.0/en/ansi-diff-foreign-keys.html
MySQL won't cascade delete/update more than 15 levels deep on foreign keys.
Where this tends to be a problem on the database side is on tables with hierarchy (
parentId
/childId
) columns and can manifest itself with this error:In Craft, this isn't a problem for structure sections, because when deleting, we start at the edge and recursively walk backward in code to perform the deletes.
But it can be an issue when deleting a volume with a deeply nested folder structure. We should perform the same logic we do for structure sections to volumes to work around this.
The text was updated successfully, but these errors were encountered: