Fixed photos table to have indexing.