[dbo].[DocumentUploadStatus]
Table used to track the status of documents being uploaded from the Document Management Viewer to an external system, such as TransDocs.
CREATE TABLE [dbo].[DocumentUploadStatus]
(
[DocumentUploadStatusID] [int] NOT NULL IDENTITY(1, 1),
[OrderFID] [int] NOT NULL,
[DocumentName] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Revision] [varchar] (14) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SysUserFID] [int] NOT NULL,
[UploadDateTime] [datetime] NOT NULL,
[XmlSystemDataTypeMapFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentUploadStatus] ADD CONSTRAINT [PK_DocumentUploadStatus] PRIMARY KEY CLUSTERED ([DocumentUploadStatusID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DocumentUploadStatus_Order_DocName] ON [dbo].[DocumentUploadStatus] ([OrderFID], [DocumentName]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DocumentUploadStatus_SysUserFID] ON [dbo].[DocumentUploadStatus] ([SysUserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentUploadStatus] ADD CONSTRAINT [FK_DocumentUploadStatus_Orders] FOREIGN KEY ([OrderFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[DocumentUploadStatus] ADD CONSTRAINT [FK_DocumentUploadStatus_SysUser] FOREIGN KEY ([SysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[DocumentUploadStatus] ADD CONSTRAINT [FK_DocumentUploadStatus_XmlSystemDataTypeMap] FOREIGN KEY ([XmlSystemDataTypeMapFID]) REFERENCES [dbo].[XmlSystemDataTypeMap] ([XmlSystemDataTypeMapID])
GO
GRANT SELECT ON [dbo].[DocumentUploadStatus] TO [MssExec]
GRANT INSERT ON [dbo].[DocumentUploadStatus] TO [MssExec]
GRANT DELETE ON [dbo].[DocumentUploadStatus] TO [MssExec]
GRANT UPDATE ON [dbo].[DocumentUploadStatus] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Table used to track the status of documents being uploaded from the Document Management Viewer to an external system, such as TransDocs.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentUploadStatus', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Name of a document being uploaded to an external system, such as TransDocs.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentUploadStatus', 'COLUMN', N'DocumentName'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key of this table.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentUploadStatus', 'COLUMN', N'DocumentUploadStatusID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key linking this table to the Orders table.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentUploadStatus', 'COLUMN', N'OrderFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Revision that uniquely identifies a particular document.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentUploadStatus', 'COLUMN', N'Revision'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key liking this table to a user record (SysUser table) and identifies the person that uploaded the document.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentUploadStatus', 'COLUMN', N'SysUserFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date and time that the document was uploaded.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentUploadStatus', 'COLUMN', N'UploadDateTime'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key linking this table to an external application through the XmlSystemDataTypeMap table.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentUploadStatus', 'COLUMN', N'XmlSystemDataTypeMapFID'
GO