X204: Referenced key must be a primary/candidate key.

Foreign key must reference a Primary or Candidate (Unique) key.

This message could also be returned if a program manipulates data from the system tables, and the site is converting from Version 2.41 to 3.x or 4.0. Look for table names that are no longer in the Version 3.x or 4.0 system tables. Make sure all references to these tables are changed prior to the pre-compilation.