[dbo].[XmlSystemRequestQueue]
CREATE TABLE [dbo].[XmlSystemRequestQueue]
(
[XmlSystemRequestQueueId] [int] NOT NULL IDENTITY(1, 1),
[XmlSystemDataTypeMapFid] [int] NOT NULL,
[XmlSystemRequestTypeFid] [int] NOT NULL,
[OrderFid] [int] NOT NULL,
[SysUserFid] [int] NOT NULL,
[XmlSystemRequestStatusFid] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlSystemRequestQueue] ADD CONSTRAINT [PK_XmlSystemRequestQueue] PRIMARY KEY CLUSTERED ([XmlSystemRequestQueueId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlSystemRequestQueue] ADD CONSTRAINT [FK_XmlSystemRequestQueue_Orders] FOREIGN KEY ([OrderFid]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[XmlSystemRequestQueue] ADD CONSTRAINT [FK_XmlSystemRequestQueue_SysUser] FOREIGN KEY ([SysUserFid]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[XmlSystemRequestQueue] ADD CONSTRAINT [FK_XmlSystemRequestQueue_XmlSystemDataTypeMap] FOREIGN KEY ([XmlSystemDataTypeMapFid]) REFERENCES [dbo].[XmlSystemDataTypeMap] ([XmlSystemDataTypeMapID])
GO
ALTER TABLE [dbo].[XmlSystemRequestQueue] ADD CONSTRAINT [FK_XmlSystemRequestQueue_XmlSystemRequestStatus] FOREIGN KEY ([XmlSystemRequestStatusFid]) REFERENCES [dbo].[XmlSystemRequestStatus] ([XmlSystemRequestStatusId])
GO
ALTER TABLE [dbo].[XmlSystemRequestQueue] ADD CONSTRAINT [FK_XmlSystemRequestQueue_XmlSystemRequestType] FOREIGN KEY ([XmlSystemRequestTypeFid]) REFERENCES [dbo].[XmlSystemRequestType] ([XmlSystemRequestTypeId])
GO
GRANT SELECT ON [dbo].[XmlSystemRequestQueue] TO [MssExec]
GRANT INSERT ON [dbo].[XmlSystemRequestQueue] TO [MssExec]
GRANT DELETE ON [dbo].[XmlSystemRequestQueue] TO [MssExec]
GRANT UPDATE ON [dbo].[XmlSystemRequestQueue] TO [MssExec]
GO