
[dbo].[PersonnelDocumentType]
CREATE TABLE [dbo].[PersonnelDocumentType]
(
[PersonnelDocumentTypeID] [int] NOT NULL IDENTITY(1, 1),
[PersonnelDocumentGroupFID] [int] NOT NULL,
[Description] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_PersonnelDocumentType_Inactive] DEFAULT ((0)),
[IsSecure] [bit] NOT NULL CONSTRAINT [DF_PersonnelDocumentType_IsSecure] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PersonnelDocumentType] ADD CONSTRAINT [PK_PersonnelDocumentType] PRIMARY KEY CLUSTERED ([PersonnelDocumentTypeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PersonnelDocumentType] ADD CONSTRAINT [IX_PersonnelDocumentType_Description] UNIQUE NONCLUSTERED ([Description]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PersonnelDocumentType] ADD CONSTRAINT [FK_PersonnelDocumentType_PersonnelDocumentGroup] FOREIGN KEY ([PersonnelDocumentGroupFID]) REFERENCES [dbo].[PersonnelDocumentGroup] ([PersonnelDocumentGroupID])
GO
GRANT SELECT ON [dbo].[PersonnelDocumentType] TO [MssExec]
GRANT INSERT ON [dbo].[PersonnelDocumentType] TO [MssExec]
GRANT DELETE ON [dbo].[PersonnelDocumentType] TO [MssExec]
GRANT UPDATE ON [dbo].[PersonnelDocumentType] TO [MssExec]
GO