X147: Cannot find key key.

The command references a key that does not exist. You must create a key before you can refer to it in a FOREIGN KEY constraint.