[dbo].[XLedgerSyncHistory]
CREATE TABLE [dbo].[XLedgerSyncHistory]
(
[XLedgerSyncHistoryId] [int] NOT NULL IDENTITY(1, 1),
[XLedgerSyncEntityTypeFid] [int] NOT NULL,
[SyncStarted] [datetimeoffset] NOT NULL,
[SyncCompleted] [datetimeoffset] NULL,
[UpToDateAsOf] [datetimeoffset] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XLedgerSyncHistory] ADD CONSTRAINT [PK_XLedgerSyncHistory] PRIMARY KEY CLUSTERED ([XLedgerSyncHistoryId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XLedgerSyncHistory] ADD CONSTRAINT [FK_XLedgerSyncHistory_XLedgerSyncEntityType] FOREIGN KEY ([XLedgerSyncEntityTypeFid]) REFERENCES [dbo].[XLedgerSyncEntityType] ([XLedgerSyncEntityTypeId])
GO
GRANT SELECT ON [dbo].[XLedgerSyncHistory] TO [MssExec]
GRANT INSERT ON [dbo].[XLedgerSyncHistory] TO [MssExec]
GRANT DELETE ON [dbo].[XLedgerSyncHistory] TO [MssExec]
GRANT UPDATE ON [dbo].[XLedgerSyncHistory] TO [MssExec]
GO