Gravity update fails with 'Unable to copy data...: FOREIGN KEY constraint failed' after teleporter import

This happend right after I imported just the Domains & Regexes from v5 via teleporter.

As it turned out, this is because for one domain the group assignment was missing as the original group isn't existant on this deployment.

It would be helpful to catch this case while teleporter import and

  • show a warning about that at the teleporter import modal dialog
  • move unassigned domains to the default group.

Ah, yes, this is indeed a tricky situation and, tbh, one I have not yet thought about. I don't think re-assigning domains to groups they have not been assigned before is a good idea but showing a warning can in general be done for certain partial imports where these situations may happen. It would at least ease maneuvering yourself back out of this situation easier. I don't think it can be avoided in a meaningful way with still offering the possibility to import only partially.