Tables [dbo].[AlertDefinition]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created1:20:01 AM Thursday, March 21, 2019
Last Modified1:20:11 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_AlertDefinition_ID: IDIDint4
False
1 - 1
Foreign Keys FK_AlertDefinition_OwnerID_Account_AccountID: [dbo].[Account].OwnerIDOwnerIDint4
False
Foreign Keys FK_AlertDefinition_DealerID_Account_AccountID: [dbo].[Account].DealerIDDealerIDint4
False
CreationDatedatetime8
False
Namenvarchar(250)500
True
Descriptionnvarchar(256)512
True
IsDealerHierarchicalbit1
False
((0))
OverdueUnitssmallint2
False
OverdueIntervalsmallint2
False
StaleUnitssmallint2
False
StaleIntervalsmallint2
False
ProposedResolutionnvarchar(1024)2048
True
KnowledgeBaseLinkvarchar(1024)1024
True
EmailGroupByFieldsmallint2
False
Enabledbit1
False
((0))
FilterDataxmlmax
True
SkipFrequencyValidationsbit1
False
((0))
AlertTypesmallint2
False
TriggerDataxmlmax
True
UpdateDatedatetime8
True
KeyNameKey ColumnsUnique
Cluster Primary Key PK_AlertDefinition_ID: IDPK_AlertDefinition_IDID
True
NameDeleteColumns
FK_AlertDefinition_DealerID_Account_AccountIDCascadeDealerID->[dbo].[Account].[AccountID]
FK_AlertDefinition_OwnerID_Account_AccountIDOwnerID->[dbo].[Account].[AccountID]
CREATE TABLE [dbo].[AlertDefinition]
(
[ID] [int] NOT NULL IDENTITY(1, 1),
[OwnerID] [int] NOT NULL,
[DealerID] [int] NOT NULL,
[CreationDate] [datetime] NOT NULL,
[Name] [nvarchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [nvarchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsDealerHierarchical] [bit] NOT NULL CONSTRAINT [DF_AlertDefinition_IsDealerHierarchical] DEFAULT ((0)),
[OverdueUnits] [smallint] NOT NULL,
[OverdueInterval] [smallint] NOT NULL,
[StaleUnits] [smallint] NOT NULL,
[StaleInterval] [smallint] NOT NULL,
[ProposedResolution] [nvarchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[KnowledgeBaseLink] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EmailGroupByField] [smallint] NOT NULL,
[Enabled] [bit] NOT NULL CONSTRAINT [DF_AlertDefinition_Enabled] DEFAULT ((0)),
[FilterData] [xml] NULL,
[SkipFrequencyValidations] [bit] NOT NULL CONSTRAINT [DF_AlertDefinition_SkipFrequencyValidations] DEFAULT ((0)),
[AlertType] [smallint] NOT NULL,
[TriggerData] [xml] NULL,
[UpdateDate] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AlertDefinition] ADD CONSTRAINT [PK_AlertDefinition_ID] PRIMARY KEY CLUSTERED  ([ID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AlertDefinition] ADD CONSTRAINT [FK_AlertDefinition_DealerID_Account_AccountID] FOREIGN KEY ([DealerID]) REFERENCES [dbo].[Account] ([AccountID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[AlertDefinition] ADD CONSTRAINT [FK_AlertDefinition_OwnerID_Account_AccountID] FOREIGN KEY ([OwnerID]) REFERENCES [dbo].[Account] ([AccountID])
GO