53
Vote

Unique Constraints

description

Support unique constraints on non-key columns

comments

Deus42 wrote Aug 8, 2012 at 2:15 PM

Guyz, srsly?

realstrategos wrote Sep 19, 2012 at 2:28 PM

agreed ...

jez9999 wrote Nov 5, 2012 at 10:01 AM

This issue basically seems to be a subset of issue #57 - Allow indexes to be specified using attribute/fluent API. A unique constraint just uses a unique index to enforce the constraint anyway, so I suggest people voting for this issue vote for issue #57.

AndriySvyryd wrote Nov 7, 2012 at 9:19 PM

@jez9999:
While SQL Server may use a unique index to enforce a unique constraint it's not the whole story.

This work item is about creating unique constraints so that they could be used in FK relationships.

Work item #57 is just about creating indexes.

So, even though they are related, neither is a subset of the other.

SimonLampen wrote May 6 at 2:30 AM

This work item is about creating unique constraints so that they could be used in FK relationships.
Agreed,
all I want to be able to do is have some flexibility around FK relationships so we don't have to reduce our database schema to single column primary key relationships everywhere. Composite column unique keys are common. Please help us by supporting them or at least point out why they are so hard to support.
This issue is the 3rd most requested on uservoice but it keeps getting bumped.