[dbo].[MilitaryAllocationVanLine]
CREATE TABLE [dbo].[MilitaryAllocationVanLine]
(
[MilitaryAllocationVanLineID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryAllocationHeaderFID] [int] NOT NULL,
[VanLineFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationVanLine] ADD CONSTRAINT [PK_MilitaryAllocationVanLine] PRIMARY KEY CLUSTERED ([MilitaryAllocationVanLineID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationVanLine] ADD CONSTRAINT [IX_MilitaryAllocationVanLine_MilitaryAllocationHeader_VanLine] UNIQUE NONCLUSTERED ([MilitaryAllocationHeaderFID], [VanLineFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationVanLine] ADD CONSTRAINT [FK_MilitaryAllocationVanLine_MilitaryAllocationHeader] FOREIGN KEY ([MilitaryAllocationHeaderFID]) REFERENCES [dbo].[MilitaryAllocationHeader] ([MilitaryAllocationHeaderID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[MilitaryAllocationVanLine] ADD CONSTRAINT [FK_MilitaryAllocationVanline_VanLine] FOREIGN KEY ([VanLineFID]) REFERENCES [dbo].[VanLine] ([VLPriKey])
GO
GRANT SELECT ON [dbo].[MilitaryAllocationVanLine] TO [MssExec]
GRANT INSERT ON [dbo].[MilitaryAllocationVanLine] TO [MssExec]
GRANT DELETE ON [dbo].[MilitaryAllocationVanLine] TO [MssExec]
GRANT UPDATE ON [dbo].[MilitaryAllocationVanLine] TO [MssExec]
GO