
create clustered INDEX [WindowsEventAlertRuleOccurrences_CLUST] ON [WindowsEventAlertRuleOccurrences] 
(
        [AlertRuleID]
       ,[DeviceID]
       ,[TimestampTicks] 
)
go

/*
	changing  Details ntext to  Details nvarchar(max)
*/
alter table WindowsEventNT6Alert
ALTER COLUMN Details nvarchar(max) null
go

ALTER TABLE [WindowsEventNT6Alert]  ADD  CONSTRAINT [WindowsEventNT6Alert_MWWindowsEventCollectionMethod_CK] 
        CHECK  (([MWWindowsEventCollectionMethod]>=(1) AND [MWWindowsEventCollectionMethod]<=(2)))
GO


ALTER TABLE [WindowsEventNT6Alert]  ADD  CONSTRAINT [WindowsEventNT6Alert_PK] PRIMARY KEY 
	CLUSTERED 
(
	[WindowsEventNT6AlertGuid] 
)
go
