[dbo].[XmlInternationalCustomsInspectionTypeMap]
CREATE TABLE [dbo].[XmlInternationalCustomsInspectionTypeMap]
(
[XmlInternationalCustomsInspectionTypeMapID] [int] NOT NULL IDENTITY(1, 1),
[XmlInterfaceFID] [int] NOT NULL,
[InternationalCustomsInspectionTypeFID] [int] NOT NULL,
[ExternalCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionTypeMap] ADD CONSTRAINT [PK_XmlInternationalCustomsInspectionTypeMap] PRIMARY KEY NONCLUSTERED ([XmlInternationalCustomsInspectionTypeMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionTypeMap] ADD CONSTRAINT [IX_XmlInternationalCustomsInspectionTypeMap_InternationalCustomsInspectionType_XMLInterface_ExternalCode] UNIQUE CLUSTERED ([InternationalCustomsInspectionTypeFID], [XmlInterfaceFID], [ExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionTypeMap] ADD CONSTRAINT [IX_XmlInternationalCustomsInspectionTypeMap_XMLInterface_ExternalCode] UNIQUE NONCLUSTERED ([XmlInterfaceFID], [ExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionTypeMap] ADD CONSTRAINT [FK_XmlInternationalCustomsInspectionTypeMap_InternationalCustomsInspectionType] FOREIGN KEY ([InternationalCustomsInspectionTypeFID]) REFERENCES [dbo].[InternationalCustomsInspectionType] ([InternationalCustomsInspectionTypeID])
GO
ALTER TABLE [dbo].[XmlInternationalCustomsInspectionTypeMap] ADD CONSTRAINT [FK_XmlInternationalCustomsInspectionTypeMap_XmlInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID])
GO
GRANT SELECT ON [dbo].[XmlInternationalCustomsInspectionTypeMap] TO [MssExec]
GRANT INSERT ON [dbo].[XmlInternationalCustomsInspectionTypeMap] TO [MssExec]
GRANT DELETE ON [dbo].[XmlInternationalCustomsInspectionTypeMap] TO [MssExec]
GRANT UPDATE ON [dbo].[XmlInternationalCustomsInspectionTypeMap] TO [MssExec]
GO