Greetings,
The message is rather clear:
Nulls not allowed in a primary key column.
Nulls are never allowed in primary key constraints. They are in foreign key constraints, to a certain degree. You can find details about this in the documentation, and, or, just perform a few tests.
E.g. build a table, create a foreigh key constraint with three columns, insert rows, with all permutations of values and nulls in the columns and check what inserts work and what inserts don´t.
Jean-Pierre