Support multiple paths per element in load_export
Refs https://redmine.teklia.com/issues/3594#note-28
There seems to exist a bug when restoring an export where elements have multiple paths.
To reproduce, use export from this corpus and simply run load_export
.
Log will be filled with
DETAIL: Key (element_id, path)=(637ee785-d9b1-490e-b2ab-6641622fe467, {7cae451e-d1df-4ff0-a3f2-0d96041d159a,17afa1f4-0403-4577-9a87-83c90ed77f7e}) already exists.
Element Paths insertion failed: duplicate key value violates unique constraint "unique_element_paths"
DETAIL: Key (element_id, path)=(2768fb65-3a64-4748-b1cb-e8ffd6341d4b, {107ee3f9-377a-4440-bd02-cdbec1939d96,9f30f498-6d0a-4f05-a60f-08de17baa38c}) already exists.
Element Paths insertion failed: duplicate key value violates unique constraint "unique_element_paths"