[DEV-1739] Add unique constraint to uuid field.
[DEV-1739] Add check for uniqueness of created uuid.