/*
	column
*/
alter table [WindowsEventNT6Monitor]
add
    [DetailsSearchOptions]  nvarchar(max)	NULL
go

alter table [WindowsEventNT6AlertRule]
add
    [DetailsSearchOptions]  nvarchar(max)	null
go

alter table [WindowsEventNT6Alert]
add
    [Details]		nvarchar(max)    NOT NULL
go

/*
	PK
*/
alter table [WindowsEventNT6Monitor]
add
	constraint WindowsEventNT6Monitor_PK primary key clustered (WindowsEventNT6MonitorID)
go

alter table WindowsEventNT6MonitorSource
add
	constraint WindowsEventNT6MonitorSource_PK primary key clustered (WindowsEventNT6MonitorID, EventSource)
go


alter table WindowsEventNT6MonitorLevel
add
	constraint WindowsEventNT6MonitorSeverity_PK primary key clustered (WindowsEventNT6MonitorID, LevelID)
go

alter table [WindowsEventNT6AlertRule]
add
	constraint [WindowsEventNT6AlertRule_PK] primary key clustered ([AlertRuleID])
go


alter table [WindowsEventNT6Alert]
add
	constraint WindowsEventNT6Alert_PK primary key clustered (WindowsEventNT6AlertGuid)
go


alter table WindowsEventMonitoringBookmark 
add
	constraint WindowsEventMonitoringBookmark_PK primary key clustered (DeviceID, EventLogName)
go


/*
	CHECK
*/
alter table [WindowsEventNT6Alert]
add
	constraint WindowsEventNT6Alert_MWWindowsEventCollectionMethod_CK 
		check (MWWindowsEventCollectionMethod between 1 and 2)
go
