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

damien tournoud’s picture

Status: Active » Needs review
StatusFileSize
new3.67 KB

Starter patch.

damien tournoud’s picture

StatusFileSize
new5.26 KB

This 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.

damien tournoud’s picture

Status: Needs review » Fixed

Committed to HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.