patch for support unique indexes with createorfail & createandget