CREATE TABLE [dbo].[XmlSystem]
(
[XmlSystemID] [int] NOT NULL IDENTITY(1, 1),
[XmlInterfaceFID] [int] NOT NULL,
[InternalSystem] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ExternalSystem] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlSystem] ADD CONSTRAINT [PK_XmlSystem] PRIMARY KEY CLUSTERED ([XmlSystemID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlSystem] ADD CONSTRAINT [IX_Unique_Interface_SystemName_Identifier] UNIQUE NONCLUSTERED ([XmlInterfaceFID], [ExternalSystem], [XmlSystemID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlSystem] ADD CONSTRAINT [FK_XmlSystem_XmlInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID])
GO
GRANT SELECT ON [dbo].[XmlSystem] TO [MssExec]
GRANT INSERT ON [dbo].[XmlSystem] TO [MssExec]
GRANT DELETE ON [dbo].[XmlSystem] TO [MssExec]
GRANT UPDATE ON [dbo].[XmlSystem] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'The name of the system used by the external application.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystem', 'COLUMN', N'ExternalSystem'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The name of the system used by Mover''s Suite.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystem', 'COLUMN', N'InternalSystem'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to an xml interface.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystem', 'COLUMN', N'XmlInterfaceFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The primary key.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystem', 'COLUMN', N'XmlSystemID'
GO