CORE-5386 Fixed parameters UUID conversions.
CORE-5386 Initial NOT NULL FK conversions.

Added NOT NULL to some foreign key columns.