Order fields to dump by ID (#13839)
This is to ensure that fields are dumped in ID order, which is necessary to ensure that parent fields are insert _before_ their children. This issue was discovered while investigating a hosted instance for which snapshotting was failing. The failures were caused by the `fk_field_parent_ref_field_id` db constraint in Metabase being violated for a MongoDB database, indicating that child fields were being inserted before parent fields. This was confirmed experimentally, and being strict about the order of the field records were confirmed as the fix. This isn't a common issue, because it only affects fields that can have parent fields, like in MongoDB.
Please register or sign in to comment