[dbo].[XmlInternationalCustomsAgentMap]
CREATE TABLE [dbo].[XmlInternationalCustomsAgentMap]
(
[XmlInternationalCustomsAgentMapID] [int] NOT NULL IDENTITY(1, 1),
[XmlInterfaceFID] [int] NOT NULL,
[InternationalCustomsAgentFID] [int] NOT NULL,
[ExternalCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsAgentMap] ADD CONSTRAINT [PK_XmlInternationalCustomsAgentMap] PRIMARY KEY NONCLUSTERED ([XmlInternationalCustomsAgentMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsAgentMap] ADD CONSTRAINT [IX_XmlInternationalCustomsAgentMap_InternationalCustomsAgentFID_XMLInterface_ExternalCode] UNIQUE CLUSTERED ([InternationalCustomsAgentFID], [XmlInterfaceFID], [ExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsAgentMap] ADD CONSTRAINT [IX_XmlInternationalCustomsAgentMap_XMLInterface_ExternalCode] UNIQUE NONCLUSTERED ([XmlInterfaceFID], [ExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsAgentMap] ADD CONSTRAINT [FK_XmlInternationalCustomsAgentMap_InternationalCustomsAgent] FOREIGN KEY ([InternationalCustomsAgentFID]) REFERENCES [dbo].[InternationalCustomsAgent] ([InternationalCustomsAgentID])
GO
ALTER TABLE [dbo].[XmlInternationalCustomsAgentMap] ADD CONSTRAINT [FK_XmlInternationalCustomsAgentMap_XmlInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID])
GO
GRANT SELECT ON [dbo].[XmlInternationalCustomsAgentMap] TO [MssExec]
GRANT INSERT ON [dbo].[XmlInternationalCustomsAgentMap] TO [MssExec]
GRANT DELETE ON [dbo].[XmlInternationalCustomsAgentMap] TO [MssExec]
GRANT UPDATE ON [dbo].[XmlInternationalCustomsAgentMap] TO [MssExec]
GO