You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cascading operations may not be nested more than 15 levels deep.
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:
SQLSTATE[HY000]: General error: 1296 Got error 193
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.
enhancementimprovements to existing featuresassets 📁features related to asset management
1 participant
Converted from issue
This discussion was converted from issue #8073 on June 22, 2021 06:31.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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.
Beta Was this translation helpful? Give feedback.
All reactions