Tables [dbo].[DocumentType]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)12
Created7:06:59 PM Thursday, December 17, 2009
Last Modified8:54:33 AM Thursday, December 5, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
Cluster Primary Key PK_DocumentType: DocumentTypeIDDocumentTypeIDint4
No
1 - 1The primary key.
Foreign Keys FK_DocumentType_DocumentGroup: [dbo].[DocumentGroup].DocumentGroupFIDDocumentGroupFIDint4
No
A foreign key to a document group.
Indexes IX_DocumentType_Type: TypeTypevarchar(10)10
No
The short type code describing the document type.
Descriptionvarchar(64)64
No
The description of the document type.
IsWorkTicketbit1
No
((0))A flag indicating whether this document type uses work ticket numbers.
Inactivebit1
No
((0))
ShowInMsCrewbit1
No
((0))
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_DocumentType: DocumentTypeIDPK_DocumentTypeDocumentTypeID
Yes
80
IX_DocumentType_TypeType
Yes
80
Foreign Keys Foreign Keys
NameColumns
FK_DocumentType_DocumentGroupDocumentGroupFID->[dbo].[DocumentGroup].[DocumentGroupID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[DocumentType]
(
[DocumentTypeID] [int] NOT NULL IDENTITY(1, 1),
[DocumentGroupFID] [int] NOT NULL,
[Type] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Description] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[IsWorkTicket] [bit] NOT NULL CONSTRAINT [DF_DocumentType_IsWorkTicket] DEFAULT ((0)),
[Inactive] [bit] NOT NULL CONSTRAINT [DF_DocumentType_Inactive] DEFAULT ((0)),
[ShowInMsCrew] [bit] NOT NULL CONSTRAINT [DF_DocumentType_ShowInMsCrew] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentType] ADD CONSTRAINT [PK_DocumentType] PRIMARY KEY CLUSTERED  ([DocumentTypeID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentType] ADD CONSTRAINT [IX_DocumentType_Type] UNIQUE NONCLUSTERED  ([Type]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentType] ADD CONSTRAINT [FK_DocumentType_DocumentGroup] FOREIGN KEY ([DocumentGroupFID]) REFERENCES [dbo].[DocumentGroup] ([DocumentGroupID])
GO
GRANT SELECT ON  [dbo].[DocumentType] TO [MssExec]
GRANT INSERT ON  [dbo].[DocumentType] TO [MssExec]
GRANT DELETE ON  [dbo].[DocumentType] TO [MssExec]
GRANT UPDATE ON  [dbo].[DocumentType] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'The description of the document type.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentType', 'COLUMN', N'Description'
GO
EXEC sp_addextendedproperty N'MS_Description', N'A foreign key to a document group.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentType', 'COLUMN', N'DocumentGroupFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The primary key.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentType', 'COLUMN', N'DocumentTypeID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'A flag indicating whether this document type uses work ticket numbers.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentType', 'COLUMN', N'IsWorkTicket'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The short type code describing the document type.', 'SCHEMA', N'dbo', 'TABLE', N'DocumentType', 'COLUMN', N'Type'
GO
Uses
Used By