[dbo].[BranchPackingCapacity]
CREATE TABLE [dbo].[BranchPackingCapacity]
(
[BranchPackingCapacityID] [int] NOT NULL IDENTITY(1, 1),
[BranchFID] [int] NOT NULL,
[Capacity] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BranchPackingCapacity] ADD CONSTRAINT [CK_BranchPackingCapacity_Capacity] CHECK (([Capacity]>(0)))
GO
ALTER TABLE [dbo].[BranchPackingCapacity] ADD CONSTRAINT [PK_BranchPackingCapacity] PRIMARY KEY CLUSTERED ([BranchPackingCapacityID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_BranchPackingCapacity_BranchFID] ON [dbo].[BranchPackingCapacity] ([BranchFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BranchPackingCapacity] ADD CONSTRAINT [FK_BranchPackingCapacity_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
GRANT SELECT ON [dbo].[BranchPackingCapacity] TO [MssExec]
GRANT INSERT ON [dbo].[BranchPackingCapacity] TO [MssExec]
GRANT DELETE ON [dbo].[BranchPackingCapacity] TO [MssExec]
GRANT UPDATE ON [dbo].[BranchPackingCapacity] TO [MssExec]
GO