Tables [dbo].[AlertEvent]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created1:20:01 AM Thursday, March 21, 2019
Last Modified1:20:30 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_AlertEvent_ID: IDIDint4
False
1 - 1
Foreign Keys FK_AlertEvent_AlertDefID_AlertDefinition_ID: [dbo].[AlertDefinition].AlertDefIDAlertDefIDint4
False
Foreign Keys FK_AlertEvent_DeviceID_Device_DeviceID: [dbo].[Device].DeviceIDDeviceIDint4
False
ConsumableHashCodeint4
True
FirstReceiveddatetime8
False
LastReceiveddatetime8
True
FirstTriggeredValuefloat8
True
LastTriggeredValuefloat8
True
EstimatedOverdueDatedatetime8
False
EstimatedStaleDatedatetime8
False
IsOverduebit1
False
((0))
IsArchivedbit1
False
((0))
IsIgnoredbit1
False
((0))
ConsumableTypeExtendedsmallint2
True
((0))
ConsumableSerialNumbervarchar(50)50
True
EventTypesmallint2
False
ServiceErrorStateint4
True
ServiceErrorCategorysmallint2
True
FirstConsoleMessagenvarchar(250)500
True
FirstPageCountTotalint4
True
LastConsoleMessagenvarchar(250)500
True
LastPageCountTotalint4
True
Updatesint4
True
AlertIndexint4
True
AlertSeverityLevelint4
True
AlertTrainingLevelint4
True
AlertGroupint4
True
AlertGroupIndexint4
True
AlertLocationint4
True
AlertCodeint4
True
AlertDescriptionnvarchar(500)1000
True
AlertTimedatetime8
True
ActivatedOnAuditIDint4
True
AlertHashCodeint4
True
ArchivedDatedatetime8
True
ArchivedReasonsmallint2
True
IsNormalizedSupplybit1
True
((0))
TriggerTypesmallint2
False
((0))
KeyNameKey ColumnsUnique
Cluster Primary Key PK_AlertEvent_ID: IDPK_AlertEvent_IDID
True
NameDeleteColumns
FK_AlertEvent_AlertDefID_AlertDefinition_IDCascadeAlertDefID->[dbo].[AlertDefinition].[ID]
FK_AlertEvent_DeviceID_Device_DeviceIDDeviceID->[dbo].[Device].[DeviceID]
CREATE TABLE [dbo].[AlertEvent]
(
[ID] [int] NOT NULL IDENTITY(1, 1),
[AlertDefID] [int] NOT NULL,
[DeviceID] [int] NOT NULL,
[ConsumableHashCode] [int] NULL,
[FirstReceived] [datetime] NOT NULL,
[LastReceived] [datetime] NULL,
[FirstTriggeredValue] [float] NULL,
[LastTriggeredValue] [float] NULL,
[EstimatedOverdueDate] [datetime] NOT NULL,
[EstimatedStaleDate] [datetime] NOT NULL,
[IsOverdue] [bit] NOT NULL CONSTRAINT [DF_AlertEvent_IsOverdue] DEFAULT ((0)),
[IsArchived] [bit] NOT NULL CONSTRAINT [DF_AlertEvent_IsArchived] DEFAULT ((0)),
[IsIgnored] [bit] NOT NULL CONSTRAINT [DF_AlertEvent_IsIgnored] DEFAULT ((0)),
[ConsumableTypeExtended] [smallint] NULL CONSTRAINT [DF_AlertEvent_ConsumableTypeExtended] DEFAULT ((0)),
[ConsumableSerialNumber] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EventType] [smallint] NOT NULL,
[ServiceErrorState] [int] NULL,
[ServiceErrorCategory] [smallint] NULL,
[FirstConsoleMessage] [nvarchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FirstPageCountTotal] [int] NULL,
[LastConsoleMessage] [nvarchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LastPageCountTotal] [int] NULL,
[Updates] [int] NULL,
[AlertIndex] [int] NULL,
[AlertSeverityLevel] [int] NULL,
[AlertTrainingLevel] [int] NULL,
[AlertGroup] [int] NULL,
[AlertGroupIndex] [int] NULL,
[AlertLocation] [int] NULL,
[AlertCode] [int] NULL,
[AlertDescription] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AlertTime] [datetime] NULL,
[ActivatedOnAuditID] [int] NULL,
[AlertHashCode] [int] NULL,
[ArchivedDate] [datetime] NULL,
[ArchivedReason] [smallint] NULL,
[IsNormalizedSupply] [bit] NULL CONSTRAINT [DF_AlertEvent_IsNormalizedSupply] DEFAULT ((0)),
[TriggerType] [smallint] NOT NULL CONSTRAINT [DF_AlertEvent_TriggerType] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AlertEvent] ADD CONSTRAINT [PK_AlertEvent_ID] PRIMARY KEY CLUSTERED  ([ID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AlertEvent] ADD CONSTRAINT [FK_AlertEvent_AlertDefID_AlertDefinition_ID] FOREIGN KEY ([AlertDefID]) REFERENCES [dbo].[AlertDefinition] ([ID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[AlertEvent] ADD CONSTRAINT [FK_AlertEvent_DeviceID_Device_DeviceID] FOREIGN KEY ([DeviceID]) REFERENCES [dbo].[Device] ([DeviceID])
GO