Add missing constraints and indexes for users and games