CREATE TABLE [dbo].[AllocationMaster]
(
[AMPriKey] [int] NOT NULL IDENTITY(1, 1),
[RGPriKey] [int] NULL,
[MTGroupPriKey] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AllocationMaster] ADD CONSTRAINT [PK_AllocationMaster] PRIMARY KEY CLUSTERED ([AMPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AllocationMaster] ADD CONSTRAINT [IX_AllocationMaster_UniqueColumns] UNIQUE NONCLUSTERED ([RGPriKey], [MTGroupPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AllocationMaster] ADD CONSTRAINT [FK_AllocationMaster_MoveTypeGroups] FOREIGN KEY ([MTGroupPriKey]) REFERENCES [dbo].[MoveTypeGroups] ([MTGroupPriKey])
GO
ALTER TABLE [dbo].[AllocationMaster] ADD CONSTRAINT [FK_AllocationMaster_RevGroups] FOREIGN KEY ([RGPriKey]) REFERENCES [dbo].[RevGroups] ([RGPriKey])
GO
GRANT SELECT ON [dbo].[AllocationMaster] TO [MssExec]
GRANT INSERT ON [dbo].[AllocationMaster] TO [MssExec]
GRANT DELETE ON [dbo].[AllocationMaster] TO [MssExec]
GRANT UPDATE ON [dbo].[AllocationMaster] TO [MssExec]
GO