Skip to main content

Error when importing data: Failed to enable constraints. One or more rows contain values non-null, unique, or foreign-key constraints

Error message when processing a data import in the admin tool.

H
Written by Harry Ledger
Updated over a month ago

If you see the error Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints, it usually means there’s a problem with the data being imported from the spreadsheet.

This most often happens during imports, especially if the file includes:

  • Duplicate key numbers in fields that should be unique.

  • Unnecessary columns or fields that don’t belong.

  • Missing values in required (non-null) fields.

  • References to records (foreign keys) that don’t exist in the system.

To fix this, check for duplicates, make sure all required fields are filled in, and remove any unnecessary data. If you're using foreign keys, confirm those records already exist in the system.

Did this answer your question?