Make all DB fields with a unique index nullable (fixes #5483)