CREATE TABLE [dbo].[AdpExportLog]
(
[AdpExportLogId] [int] NOT NULL IDENTITY(1, 1),
[TimeStamp] [datetime] NOT NULL,
[Success] [bit] NULL,
[AdpBadge] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Location] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Timeclock] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[JsonMessage] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NumberOfPunches] [int] NULL,
[MobileCrewTimeFIDs] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MobileCrewTimeSentStatusFID] [int] NULL,
[IsReceivedJson] [bit] NOT NULL CONSTRAINT [DF_AdpExportLog_IsReceivedJson] DEFAULT ((0))
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdpExportLog] ADD CONSTRAINT [PK_AdpExportLog] PRIMARY KEY CLUSTERED ([AdpExportLogId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdpExportLog] ADD CONSTRAINT [FK_AdpExportLog_MobileCrewTimeSentStatusFID] FOREIGN KEY ([MobileCrewTimeSentStatusFID]) REFERENCES [dbo].[MobileCrewTimeSentStatus] ([MobileCrewTimeSentStatusID])
GO
GRANT SELECT ON [dbo].[AdpExportLog] TO [MssExec]
GRANT INSERT ON [dbo].[AdpExportLog] TO [MssExec]
GRANT DELETE ON [dbo].[AdpExportLog] TO [MssExec]
GRANT UPDATE ON [dbo].[AdpExportLog] TO [MssExec]
GO