To be clear, the digit at position i is the row number of the queen in column i.
So 12345678 is every queen along the diagonal (clearly not a solution).
The model (8 different digits representing row in that column) no queen was in the same row or column, by construction. So only the diagonal test remains.