CREATE TABLE [dbo].[ATHistoryEvent] (
    [HistoryEventId] INT            NOT NULL,
    [HistoryId]      INT            NOT NULL,
    [ProcessName]    NVARCHAR (255) NOT NULL,
    [EventName]      NVARCHAR (255) NOT NULL,
    [Queue]          NVARCHAR (32)  NULL,
    CONSTRAINT [PK_ATHistoryEvent] PRIMARY KEY NONCLUSTERED ([HistoryEventId] ASC),
    CONSTRAINT [ATHistoryEvent_FK1] FOREIGN KEY ([HistoryId]) REFERENCES [dbo].[ATHistory] ([HistoryId])
);

