Ensure unique id (rethinkdb)