CREATE TABLE [dbo].[ATErrors] (
    [ErrorRecId]          INT             IDENTITY (1, 1) NOT NULL,
    [ErrorDate]           DATETIME        NOT NULL,
    [ProcessGroup]        NVARCHAR (255)  NOT NULL,
    [ProcessName]         NVARCHAR (255)  NOT NULL,
    [WorkItemName]        NVARCHAR (255)  NOT NULL,
    [WorkItemId]          INT             NOT NULL,
    [WorkItemReferenceId] INT             NOT NULL,
    [Event]               NVARCHAR (255)  NOT NULL,
    [Message]             NVARCHAR (2000) NULL,
    CONSTRAINT [PK_ATErrors] 
        PRIMARY KEY CLUSTERED ([ErrorRecId] ASC)
);

