ALTER TABLE [SdkElement] ADD 
    CONSTRAINT [SdkElement_PK] PRIMARY KEY  CLUSTERED 
		([DeviceGuid], [SdkElementTypeID], [SdkElementGuid])
go

ALTER TABLE [SdkElementAttributeData] ADD 
    CONSTRAINT [SdkElementAttributeData_PK] PRIMARY KEY  CLUSTERED 
		([SdkElementGuid], [SdkElementAttributeTypeID])
go

ALTER TABLE [SdkElementAttributeType] ADD 
    CONSTRAINT [SdkElementAttributeType_PK] PRIMARY KEY  CLUSTERED 
		([SdkElementAttributeTypeID])
go

ALTER TABLE [SdkElementType] ADD 
    CONSTRAINT [SdkElementType_PK] PRIMARY KEY  CLUSTERED 
		([SdkElementTypeID])
go





CREATE UNIQUE INDEX [AK_SdkElement_SdkElementGuid] ON [SdkElement]([SdkElementGuid])
    INCLUDE (SdkElementTypeID)  -- Express only
go

/*
	for 7.1.2 2012-R2-FP2
*/
alter table SdkElementAttributeData
	add [TextValue] nvarchar(max) NOT null
go