[dbo].[XmlExternalInterfaceLogin]
CREATE TABLE [dbo].[XmlExternalInterfaceLogin]
(
[XmlExternalInterfaceLoginID] [int] NOT NULL IDENTITY(1, 1),
[XmlInterfaceFID] [int] NOT NULL,
[UserAccessFID] [int] NOT NULL,
[Username] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlExternalInterfaceLogin] ADD CONSTRAINT [PK_XmlExternalInterfaceLogin] PRIMARY KEY NONCLUSTERED ([XmlExternalInterfaceLoginID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlExternalInterfaceLogin] ADD CONSTRAINT [IX_XmlExternalInterfaceLogin_XMLInterface_UserAccess] UNIQUE NONCLUSTERED ([XmlInterfaceFID], [UserAccessFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlExternalInterfaceLogin] ADD CONSTRAINT [FK_XmlExternalInterfaceLogin_UserAccess] FOREIGN KEY ([UserAccessFID]) REFERENCES [dbo].[UserAccess] ([UserAccessPriKey]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[XmlExternalInterfaceLogin] ADD CONSTRAINT [FK_XmlExternalInterfaceLogin_XMLInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID])
GO
GRANT SELECT ON [dbo].[XmlExternalInterfaceLogin] TO [MssExec]
GRANT INSERT ON [dbo].[XmlExternalInterfaceLogin] TO [MssExec]
GRANT DELETE ON [dbo].[XmlExternalInterfaceLogin] TO [MssExec]
GRANT UPDATE ON [dbo].[XmlExternalInterfaceLogin] TO [MssExec]
GO
EXEC sp_addextendedproperty N'Description', N'Holds login information for a particular user and external interface', 'SCHEMA', N'dbo', 'TABLE', N'XmlExternalInterfaceLogin', NULL, NULL
GO
EXEC sp_addextendedproperty N'Description', N'Foreign key to a useraccess record', 'SCHEMA', N'dbo', 'TABLE', N'XmlExternalInterfaceLogin', 'COLUMN', N'UserAccessFID'
GO
EXEC sp_addextendedproperty N'Description', N'Login username for an external interface.', 'SCHEMA', N'dbo', 'TABLE', N'XmlExternalInterfaceLogin', 'COLUMN', N'Username'
GO
EXEC sp_addextendedproperty N'Description', N'Primary key of the XmlExternalInterfaceLogin table.', 'SCHEMA', N'dbo', 'TABLE', N'XmlExternalInterfaceLogin', 'COLUMN', N'XmlExternalInterfaceLoginID'
GO
EXEC sp_addextendedproperty N'Description', N'Foreign key to an external interface.', 'SCHEMA', N'dbo', 'TABLE', N'XmlExternalInterfaceLogin', 'COLUMN', N'XmlInterfaceFID'
GO