Enforcing a restriction on the foreign key type definitiosn at compile time