[dbo].[XmlInterfaceCredentialMap]
CREATE TABLE [dbo].[XmlInterfaceCredentialMap]
(
[XmlInterfaceCredentialMapID] [int] NOT NULL IDENTITY(1, 1),
[XmlInterfaceFID] [int] NOT NULL,
[SysUserFID] [int] NOT NULL,
[UserName] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Password] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInterfaceCredentialMap] ADD CONSTRAINT [PK_XmlInterfaceCredentialMap] PRIMARY KEY NONCLUSTERED ([XmlInterfaceCredentialMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInterfaceCredentialMap] ADD CONSTRAINT [IX_XmlInterfaceCredentialMap_SysUserFID_XMLInterface_UserName] UNIQUE CLUSTERED ([SysUserFID], [XmlInterfaceFID], [UserName]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlInterfaceCredentialMap] ADD CONSTRAINT [FK_XmlInterfaceCredentialMap_SysUser] FOREIGN KEY ([SysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[XmlInterfaceCredentialMap] ADD CONSTRAINT [FK_XmlInterfaceCredentialMap_XmlInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID])
GO
GRANT SELECT ON [dbo].[XmlInterfaceCredentialMap] TO [MssExec]
GRANT INSERT ON [dbo].[XmlInterfaceCredentialMap] TO [MssExec]
GRANT DELETE ON [dbo].[XmlInterfaceCredentialMap] TO [MssExec]
GRANT UPDATE ON [dbo].[XmlInterfaceCredentialMap] TO [MssExec]
GO