[dbo].[MilitaryCarrierContact]
CREATE TABLE [dbo].[MilitaryCarrierContact]
(
[MilitaryCarrierContactID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryCarrierFID] [int] NOT NULL,
[Contact] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Title] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Email] [varchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsDefault] [bit] NOT NULL CONSTRAINT [DF_MilitaryCarrierContact_IsDefault] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierContact] ADD CONSTRAINT [PK_MilitaryCarrierContact] PRIMARY KEY CLUSTERED ([MilitaryCarrierContactID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MilitaryCarrierContact_MilitaryCarrier] ON [dbo].[MilitaryCarrierContact] ([MilitaryCarrierFID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_MilitaryCarrierContact_MilitaryCarrier_IsDefault] ON [dbo].[MilitaryCarrierContact] ([MilitaryCarrierFID]) WHERE ([IsDefault]=(1)) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [ix_MilitaryCarrierContacts_Carrier] ON [dbo].[MilitaryCarrierContact] ([MilitaryCarrierFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierContact] ADD CONSTRAINT [FK_MilitaryCarrierContact_MilitaryCarrier] FOREIGN KEY ([MilitaryCarrierFID]) REFERENCES [dbo].[MilitaryCarrier] ([MilitaryCarrierID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[MilitaryCarrierContact] TO [MssExec]
GRANT INSERT ON [dbo].[MilitaryCarrierContact] TO [MssExec]
GRANT DELETE ON [dbo].[MilitaryCarrierContact] TO [MssExec]
GRANT UPDATE ON [dbo].[MilitaryCarrierContact] TO [MssExec]
GO