created unique index constraint on photos