
[dbo].[XLedgerAccountingPeriod]
CREATE TABLE [dbo].[XLedgerAccountingPeriod]
(
[XLedgerAccountingPeriodId] [int] NOT NULL IDENTITY(1, 1),
[ExternalDbId] [int] NOT NULL,
[FromDate] [date] NOT NULL,
[ToDate] [date] NOT NULL,
[FiscalYear] [int] NOT NULL,
[FiscalPeriod] [int] NOT NULL,
[Code] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Open] [bit] NOT NULL,
[Description] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreatedOn] [datetimeoffset] NOT NULL,
[LastImportedOn] [datetimeoffset] NOT NULL,
[OpenStatusChangedOn] [datetimeoffset] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XLedgerAccountingPeriod] ADD CONSTRAINT [PK_XLedgerAccountingPeriod] PRIMARY KEY NONCLUSTERED ([XLedgerAccountingPeriodId]) ON [PRIMARY]
GO
CREATE UNIQUE CLUSTERED INDEX [IX_XLedgerAccountingPeriod_FromDate_ToDate] ON [dbo].[XLedgerAccountingPeriod] ([FromDate], [ToDate]) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[XLedgerAccountingPeriod] TO [MssExec]
GRANT INSERT ON [dbo].[XLedgerAccountingPeriod] TO [MssExec]
GRANT DELETE ON [dbo].[XLedgerAccountingPeriod] TO [MssExec]
GRANT UPDATE ON [dbo].[XLedgerAccountingPeriod] TO [MssExec]
GO