[dbo].[XmlExternalInterfaceShipmentStatusMap]
CREATE TABLE [dbo].[XmlExternalInterfaceShipmentStatusMap]
(
[XmlExternalInterfaceShipmentStatusMapID] [int] NOT NULL IDENTITY(1, 1),
[XmlInterfaceFID] [int] NOT NULL,
[ShipmentStatusFID] [int] NOT NULL,
[ExternalCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlExternalInterfaceShipmentStatusMap] ADD CONSTRAINT [PK_XmlExternalInterfaceShipmentStatusMap] PRIMARY KEY NONCLUSTERED ([XmlExternalInterfaceShipmentStatusMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlExternalInterfaceShipmentStatusMap] ADD CONSTRAINT [IX_XmlExternalInterfaceShipmentStatusMap_XMLInterface_ExternalCode] UNIQUE NONCLUSTERED ([XmlInterfaceFID], [ExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlExternalInterfaceShipmentStatusMap] ADD CONSTRAINT [IX_XmlExternalInterfaceShipmentStatusMap_XMLInterface_ShipmentStatus] UNIQUE NONCLUSTERED ([XmlInterfaceFID], [ShipmentStatusFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlExternalInterfaceShipmentStatusMap] ADD CONSTRAINT [FK_XmlExternalInterfaceShipmentStatusMap_ShipmentStatus] FOREIGN KEY ([ShipmentStatusFID]) REFERENCES [dbo].[ShipmentStatus] ([ShipmentStatusID])
GO
ALTER TABLE [dbo].[XmlExternalInterfaceShipmentStatusMap] ADD CONSTRAINT [FK_XmlExternalInterfaceShipmentStatusMap_XmlInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID])
GO
GRANT SELECT ON [dbo].[XmlExternalInterfaceShipmentStatusMap] TO [MssExec]
GRANT INSERT ON [dbo].[XmlExternalInterfaceShipmentStatusMap] TO [MssExec]
GRANT DELETE ON [dbo].[XmlExternalInterfaceShipmentStatusMap] TO [MssExec]
GRANT UPDATE ON [dbo].[XmlExternalInterfaceShipmentStatusMap] TO [MssExec]
GO
EXEC sp_addextendedproperty N'Description', N'Holds a shipment status for a particular external interface.', 'SCHEMA', N'dbo', 'TABLE', N'XmlExternalInterfaceShipmentStatusMap', NULL, NULL
GO
EXEC sp_addextendedproperty N'Description', N'Code used to map a vanline between an external interface and mover''s suite.', 'SCHEMA', N'dbo', 'TABLE', N'XmlExternalInterfaceShipmentStatusMap', 'COLUMN', N'ExternalCode'
GO
EXEC sp_addextendedproperty N'Description', N'Primary key of the XmlExternalInterfaceShipmentStatusMap table.', 'SCHEMA', N'dbo', 'TABLE', N'XmlExternalInterfaceShipmentStatusMap', 'COLUMN', N'XmlExternalInterfaceShipmentStatusMapID'
GO
EXEC sp_addextendedproperty N'Description', N'Foreign key to an external interface.', 'SCHEMA', N'dbo', 'TABLE', N'XmlExternalInterfaceShipmentStatusMap', 'COLUMN', N'XmlInterfaceFID'
GO