add pk and index attribute