add index to photos table