Udpdate to support the unique index in 1.9.x