add unique constraint on doc_id pillow