Production.Document Table
Information
| Name | Document |
| Schema | Production |
| Row Count | 0 |
| Data Size | |
| Index Size | |
| Reserved Size | |
| Unused Size | |
| Created | 29.3.2010. 21:58:18 |
| Modified | 29.3.2010. 21:58:54 |
Extended Properties
| Name | Type | Property Name | Value |
| Document | TABLE | MS_Description | Product maintenance documents. |
Columns
| PK | Key | Identity | Name | Data Type | Allow Nulls | Collation | References | Default | Computed | Compute Expression |
|   |   |   | DocumentID | int |   | | | |   | |
| |   |   | Title | nvarchar(50) |   | SQL_Latin1_General_CP1_CI_AS | | |   | |
| |   |   | FileName | nvarchar(400) |   | SQL_Latin1_General_CP1_CI_AS | | |   | |
| |   |   | FileExtension | nvarchar(8) |   | SQL_Latin1_General_CP1_CI_AS | | |   | |
| |   |   | Revision | nchar(5) |   | SQL_Latin1_General_CP1_CI_AS | | |   | |
| |   |   | ChangeNumber | int |   | | | ((0)) |   | |
| |   |   | Status | tinyint |   | | | |   | |
| |   |   | DocumentSummary | nvarchar(max) |   | SQL_Latin1_General_CP1_CI_AS | | |   | |
| |   |   | Document | varbinary(max) |   | | | |   | |
| |   |   | ModifiedDate | datetime |   | | | (getdate()) |   | |
Indexes
Check Constraints
| Name | Column | Enabled | Trusted | Expression |
| CK_Document_Status | Status |   |   | ([Status]>=(1) AND [Status]<=(3)) |
SQL Script
CREATE TABLE [Production].[Document] (
[DocumentID] int NOT NULL IDENTITY,
[Title] nvarchar(50) NOT NULL,
[FileName] nvarchar(400) NOT NULL,
[FileExtension] nvarchar(8) NOT NULL,
[Revision] nchar(5) NOT NULL,
[ChangeNumber] int NOT NULL DEFAULT ((0)),
[Status] tinyint NOT NULL,
[DocumentSummary] nvarchar(max) NULL,
[Document] varbinary(max) NULL,
[ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);
CREATE UNIQUE INDEX [AK_Document_FileName_Revision] on [Production].[Document]([FileName], [Revision]);