[dbo].[VanlineStatementDownloadLog]
CREATE TABLE [dbo].[VanlineStatementDownloadLog]
(
[VanlineStatementDownloadLogID] [int] NOT NULL IDENTITY(1, 1),
[VanlineStatementHeaderFID] [int] NOT NULL,
[DataDate] [datetime] NULL,
[CloudReceivedDateUtc] [datetime] NULL,
[LocalDownloadDateUtc] [datetime] NOT NULL,
[RawSourceMessage] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IgnoreDownload] [bit] NOT NULL CONSTRAINT [DF_VanlineStatementDownloadLog_IgnoreDownload] DEFAULT ((0))
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementDownloadLog] ADD CONSTRAINT [PK_VanlineStatementDownloadLog] PRIMARY KEY CLUSTERED ([VanlineStatementDownloadLogID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanlineStatementDownloadLog_Header] ON [dbo].[VanlineStatementDownloadLog] ([VanlineStatementHeaderFID], [VanlineStatementDownloadLogID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementDownloadLog] ADD CONSTRAINT [FK_VanlineStatementDownloadLog_VanlineStatementHeader] FOREIGN KEY ([VanlineStatementHeaderFID]) REFERENCES [dbo].[VanlineStatementHeader] ([VanlineStatementHeaderID])
GO
GRANT SELECT ON [dbo].[VanlineStatementDownloadLog] TO [MssExec]
GRANT INSERT ON [dbo].[VanlineStatementDownloadLog] TO [MssExec]
GRANT DELETE ON [dbo].[VanlineStatementDownloadLog] TO [MssExec]
GRANT UPDATE ON [dbo].[VanlineStatementDownloadLog] TO [MssExec]
GO