Fixing error were duplicated funding was allowed and fixing issue where ...

...external identifiers cannt be added because a constraint thinks it is a duplicate