fixes #8366 - add parameter type to unique index

shouldn't this be after the `if`?