CREATE TABLE [dbo].[XLedgerSupplier]
(
[XLedgerSupplierId] [int] NOT NULL IDENTITY(1, 1),
[ExternalDbId] [int] NOT NULL,
[AccountingVendorFid] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XLedgerSupplier] ADD CONSTRAINT [PK_XLedgerSupplier] PRIMARY KEY NONCLUSTERED ([XLedgerSupplierId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XLedgerSupplier] ADD CONSTRAINT [IX_XLedgerSupplier_ExternalDbId] UNIQUE CLUSTERED ([XLedgerSupplierId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XLedgerSupplier] ADD CONSTRAINT [FK_XLedgerSupplier_AccountingVendor] FOREIGN KEY ([AccountingVendorFid]) REFERENCES [dbo].[AccountingVendor] ([AccountingVendorId])
GO
GRANT SELECT ON [dbo].[XLedgerSupplier] TO [MssExec]
GRANT INSERT ON [dbo].[XLedgerSupplier] TO [MssExec]
GRANT DELETE ON [dbo].[XLedgerSupplier] TO [MssExec]
GRANT UPDATE ON [dbo].[XLedgerSupplier] TO [MssExec]
GO