[dbo].[XmlInternationalCustomsInspectionLocationMap]
CREATE TABLE [dbo].[XmlInternationalCustomsInspectionLocationMap]
(
[XmlInternationalCustomsInspectionLocationMapID] [int] NOT NULL IDENTITY(1, 1),
[XmlInterfaceFID] [int] NOT NULL,
[InternationalCustomsInspectionLocationFID] [int] NOT NULL,
[ExternalCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionLocationMap] ADD CONSTRAINT [PK_XmlInternationalCustomsInspectionLocationMap] PRIMARY KEY NONCLUSTERED ([XmlInternationalCustomsInspectionLocationMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionLocationMap] ADD CONSTRAINT [IX_XmlInternationalCustomsInspectionLocationMap_InternationalCustomsInspectionLocation_XMLInterface_ExternalCode] UNIQUE CLUSTERED ([InternationalCustomsInspectionLocationFID], [XmlInterfaceFID], [ExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionLocationMap] ADD CONSTRAINT [IX_XmlInternationalCustomsInspectionLocationMap_XMLInterface_ExternalCode] UNIQUE NONCLUSTERED ([XmlInterfaceFID], [ExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionLocationMap] ADD CONSTRAINT [FK_XmlInternationalCustomsInspectionLocationMap_InternationalCustomsInspectionLocation] FOREIGN KEY ([InternationalCustomsInspectionLocationFID]) REFERENCES [dbo].[InternationalCustomsInspectionLocation] ([InternationalCustomsInspectionLocationID])
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionLocationMap] ADD CONSTRAINT [FK_XmlInternationalCustomsInspectionLocationMap_XmlInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID])
GO
GRANT SELECT ON [dbo].[XmlInternationalCustomsInspectionLocationMap] TO [MssExec]
GRANT INSERT ON [dbo].[XmlInternationalCustomsInspectionLocationMap] TO [MssExec]
GRANT DELETE ON [dbo].[XmlInternationalCustomsInspectionLocationMap] TO [MssExec]
GRANT UPDATE ON [dbo].[XmlInternationalCustomsInspectionLocationMap] TO [MssExec]
GO