Filtered indexes have several issues:
- they are not available on SQL Server 2005
- they are not (yet) supported by the database synchronization feature of MS Deploy (and thus breaks Webmatrix deployment)
Yet we need them because SQL Server has its own semantic for NULL values: NULL == NULL, which means that only one NULL value can be present in a UNIQUE column.
This issue focuses on getting rid of the filtered indexes. The basic idea is to create a computed column that replaces NULL values with a random value that is unlikely to collide with anything a human/machine could put into the column.
Comments
Comment #1
damien tournoud commentedStarter patch.
Comment #2
damien tournoud commentedThis worked right out of the box, and introduced no regression to the database test suite. Sweet!
New version of the patch, standardizing the technical column names to anything using the '__' prefix. This looks good to go as far as I'm concerned.
Comment #3
damien tournoud commentedCommitted to HEAD.