[dbo].[EquipmentDocumentTypeUserMap]
CREATE TABLE [dbo].[EquipmentDocumentTypeUserMap]
(
[EquipmentDocumentTypeUserMapID] [int] NOT NULL IDENTITY(1, 1),
[SysUserFID] [int] NOT NULL,
[EquipmentDocumentTypeFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EquipmentDocumentTypeUserMap] ADD CONSTRAINT [PK_EquipmentDocumentTypeUserMap] PRIMARY KEY CLUSTERED ([EquipmentDocumentTypeUserMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EquipmentDocumentTypeUserMap] ADD CONSTRAINT [IX_EquipmentDocumentType_SysUserFID_EquipmentDocumentTypeFID] UNIQUE NONCLUSTERED ([SysUserFID], [EquipmentDocumentTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EquipmentDocumentTypeUserMap] ADD CONSTRAINT [FK_EquipmentDocumentTypeUserMap_EquipmentDocumentType] FOREIGN KEY ([EquipmentDocumentTypeFID]) REFERENCES [dbo].[EquipmentDocumentType] ([EquipmentDocumentTypeID])
GO
ALTER TABLE [dbo].[EquipmentDocumentTypeUserMap] ADD CONSTRAINT [FK_EquipmentDocumentTypeUserMap_SysUser] FOREIGN KEY ([SysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[EquipmentDocumentTypeUserMap] TO [MssExec]
GRANT INSERT ON [dbo].[EquipmentDocumentTypeUserMap] TO [MssExec]
GRANT DELETE ON [dbo].[EquipmentDocumentTypeUserMap] TO [MssExec]
GRANT UPDATE ON [dbo].[EquipmentDocumentTypeUserMap] TO [MssExec]
GO