CREATE TABLE [dbo].[CapacityBucket]
(
[CapacityBucketID] [int] NOT NULL IDENTITY(1, 1),
[BucketName] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CapacityBucketTypeFID] [int] NOT NULL,
[SortOrder] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CapacityBucket] ADD CONSTRAINT [PK_CapacityBucket] PRIMARY KEY CLUSTERED ([CapacityBucketID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_CapacityBucket_BucketName] ON [dbo].[CapacityBucket] ([BucketName]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CapacityBucket_CapacityBucketTypeFID] ON [dbo].[CapacityBucket] ([CapacityBucketTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CapacityBucket] ADD CONSTRAINT [FK_CapacityBucket_CapacityBucketType] FOREIGN KEY ([CapacityBucketTypeFID]) REFERENCES [dbo].[CapacityBucketType] ([CapacityBucketTypeID])
GO
GRANT SELECT ON [dbo].[CapacityBucket] TO [MssExec]
GRANT INSERT ON [dbo].[CapacityBucket] TO [MssExec]
GRANT DELETE ON [dbo].[CapacityBucket] TO [MssExec]
GRANT UPDATE ON [dbo].[CapacityBucket] TO [MssExec]
GO