Skip to content

Full SQL implementation of Element.add_parent and remove_child

Erwan Rouchet requested to merge add-parent-sql into master

Closes #1294 (closed) and #1296 (closed)

This uses raw SQL for both Element.add_parent and Element.remove_child, avoiding as much traffic between the backend and the DB as possible and thus allowing much larger updates on ElementPaths. While large moves can still cause timeouts, some of it can be avoided with the Move elements or Link to another parent options in the element selection. In the case of teklia/requests#693, where moving some large top-level folders into a subfolder was very difficult, I managed to move all four folders in 15 minutes locally with the selection.

!1930 (closed) contains just the remove_child part, which might be easier to review but has broken unit tests that require also implementing add_parent here.

Edited by Erwan Rouchet

Merge request reports

Loading