Tables [dbo].[MSSDocument]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created3:21:00 PM Wednesday, September 26, 2012
Last Modified7:42:53 PM Wednesday, February 28, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_MSSDocument: MSSDocumentIDMSSDocumentIDint4
No
1 - 1
Foreign Keys FK_MSSDocument_Orders: [dbo].[Orders].OrderFIDIndexes IX_MSSDocument_Order_DocName_DeletedOn: OrderFID\DocumentName\DeletedOnOrderFIDint4
No
Indexes IX_MSSDocument_Order_DocName_DeletedOn: OrderFID\DocumentName\DeletedOnDocumentNamevarchar(128)128
No
Foreign Keys FK_MSSDocument_SysUser: [dbo].[Sysuser].SysUserFIDIndexes IX_MSSDocument_SysUserFID: SysUserFIDSysUserFIDint4
No
UploadDateTimedatetime8
No
LastModifieddatetime8
No
ContentUrlvarchar(255)255
Yes
Foreign Keys FK_MSSDocument_MSSDocumentImage: [dbo].[MSSDocumentImage].MSSDocumentImageFIDMSSDocumentImageFIDint4
Yes
Foreign Keys FK_MSSDocument_DocumentType: [dbo].[DocumentType].DocumentTypeFIDDocumentTypeFIDint4
No
DocumentDescriptionvarchar(64)64
Yes
Foreign Keys FK_MSSDocument_WorkTicket: [dbo].[WorkTickets].WorkTicketFIDWorkTicketFIDint4
Yes
DocumentNotesvarchar(256)256
Yes
Foreign Keys FK_MSSDocument_DocumentDeletionReason: [dbo].[DocumentDeletionReason].DocumentDeletionReasonFIDDocumentDeletionReasonFIDint4
Yes
Foreign Keys FK_MSSDocument_SysUser2: [dbo].[Sysuser].DeletedByIndexes IX_MSSDocument_DeletedBy: DeletedByDeletedByint4
Yes
Indexes IX_MSSDocument_Order_DocName_DeletedOn: OrderFID\DocumentName\DeletedOnDeletedOndatetime8
Yes
SendToCrewbit1
No
((0))
DocByteSizeint4
Yes
IntegratorKeyIDnvarchar(4)8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_MSSDocument: MSSDocumentIDPK_MSSDocumentMSSDocumentID
Yes
IX_MSSDocument_Order_DocName_DeletedOnOrderFID, DocumentName, DeletedOn
Yes
IX_MSSDocument_DeletedByDeletedBy
IX_MSSDocument_SysUserFIDSysUserFID
Foreign Keys Foreign Keys
NameColumns
FK_MSSDocument_SysUser2DeletedBy->[dbo].[Sysuser].[SysUserID]
FK_MSSDocument_DocumentDeletionReasonDocumentDeletionReasonFID->[dbo].[DocumentDeletionReason].[DocumentDeletionReasonID]
FK_MSSDocument_DocumentTypeDocumentTypeFID->[dbo].[DocumentType].[DocumentTypeID]
FK_MSSDocument_MSSDocumentImageMSSDocumentImageFID->[dbo].[MSSDocumentImage].[MSSDocumentImageID]
FK_MSSDocument_OrdersOrderFID->[dbo].[Orders].[PriKey]
FK_MSSDocument_SysUserSysUserFID->[dbo].[Sysuser].[SysUserID]
FK_MSSDocument_WorkTicketWorkTicketFID->[dbo].[WorkTickets].[WorkTicketID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MSSDocument]
(
[MSSDocumentID] [int] NOT NULL IDENTITY(1, 1),
[OrderFID] [int] NOT NULL,
[DocumentName] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[SysUserFID] [int] NOT NULL,
[UploadDateTime] [datetime] NOT NULL,
[LastModified] [datetime] NOT NULL,
[ContentUrl] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MSSDocumentImageFID] [int] NULL,
[DocumentTypeFID] [int] NOT NULL,
[DocumentDescription] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[WorkTicketFID] [int] NULL,
[DocumentNotes] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DocumentDeletionReasonFID] [int] NULL,
[DeletedBy] [int] NULL,
[DeletedOn] [datetime] NULL,
[SendToCrew] [bit] NOT NULL CONSTRAINT [DF_MSSDocument_SendToCrew] DEFAULT ((0)),
[DocByteSize] [int] NULL,
[IntegratorKeyID] [nvarchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MSSDocument] ADD CONSTRAINT [PK_MSSDocument] PRIMARY KEY CLUSTERED  ([MSSDocumentID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MSSDocument_DeletedBy] ON [dbo].[MSSDocument] ([DeletedBy]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_MSSDocument_Order_DocName_DeletedOn] ON [dbo].[MSSDocument] ([OrderFID], [DocumentName], [DeletedOn]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MSSDocument_SysUserFID] ON [dbo].[MSSDocument] ([SysUserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MSSDocument] ADD CONSTRAINT [FK_MSSDocument_SysUser2] FOREIGN KEY ([DeletedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[MSSDocument] ADD CONSTRAINT [FK_MSSDocument_DocumentDeletionReason] FOREIGN KEY ([DocumentDeletionReasonFID]) REFERENCES [dbo].[DocumentDeletionReason] ([DocumentDeletionReasonID])
GO
ALTER TABLE [dbo].[MSSDocument] ADD CONSTRAINT [FK_MSSDocument_DocumentType] FOREIGN KEY ([DocumentTypeFID]) REFERENCES [dbo].[DocumentType] ([DocumentTypeID])
GO
ALTER TABLE [dbo].[MSSDocument] ADD CONSTRAINT [FK_MSSDocument_MSSDocumentImage] FOREIGN KEY ([MSSDocumentImageFID]) REFERENCES [dbo].[MSSDocumentImage] ([MSSDocumentImageID])
GO
ALTER TABLE [dbo].[MSSDocument] ADD CONSTRAINT [FK_MSSDocument_Orders] FOREIGN KEY ([OrderFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[MSSDocument] ADD CONSTRAINT [FK_MSSDocument_SysUser] FOREIGN KEY ([SysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[MSSDocument] ADD CONSTRAINT [FK_MSSDocument_WorkTicket] FOREIGN KEY ([WorkTicketFID]) REFERENCES [dbo].[WorkTickets] ([WorkTicketID])
GO
GRANT SELECT ON  [dbo].[MSSDocument] TO [MssExec]
GRANT INSERT ON  [dbo].[MSSDocument] TO [MssExec]
GRANT DELETE ON  [dbo].[MSSDocument] TO [MssExec]
GRANT UPDATE ON  [dbo].[MSSDocument] TO [MssExec]
GO
Uses
Used By