Fixes #5405. Adds a normal key index as the uniqueness can be less restrictive. Removes the primary keys. Thanks to @Surefirer, @Patotron, and @gen1x8!