make index uniq so the upsert will function correctly