PATCH for duplicate-unique_ids. real-solution:fix the db