[dbo].[MilitaryCarrierContactPhoneNumber]
CREATE TABLE [dbo].[MilitaryCarrierContactPhoneNumber]
(
[MilitaryCarrierContactPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[CountryCodeStandardFID] [int] NULL,
[AreaCode] [dbo].[PhoneAreaCode] NULL,
[LocalNumber] [dbo].[PhoneLocalNumber] NULL,
[Extension] [dbo].[PhoneExtension] NULL,
[MilitaryCarrierContactFID] [int] NOT NULL,
[MilitaryCarrierContactPhoneTypeFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierContactPhoneNumber] ADD CONSTRAINT [PK_MilitaryCarrierContactPhoneNumber] PRIMARY KEY NONCLUSTERED ([MilitaryCarrierContactPhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierContactPhoneNumber] ADD CONSTRAINT [IX_MilitaryCarrierContactPhoneNumber_MilitaryCarrierContactAndPhoneType] UNIQUE NONCLUSTERED ([MilitaryCarrierContactFID], [MilitaryCarrierContactPhoneTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierContactPhoneNumber] ADD CONSTRAINT [FK_MilitaryCarrierContactPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[MilitaryCarrierContactPhoneNumber] ADD CONSTRAINT [FK_MilitaryCarrierContactPhoneNumber_MilitaryCarrierContact] FOREIGN KEY ([MilitaryCarrierContactFID]) REFERENCES [dbo].[MilitaryCarrierContact] ([MilitaryCarrierContactID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[MilitaryCarrierContactPhoneNumber] ADD CONSTRAINT [FK_MilitaryCarrierContactPhoneNumber_MilitaryCarrierContactPhoneType] FOREIGN KEY ([MilitaryCarrierContactPhoneTypeFID]) REFERENCES [dbo].[MilitaryCarrierContactPhoneType] ([MilitaryCarrierContactPhoneTypeID])
GO
GRANT SELECT ON [dbo].[MilitaryCarrierContactPhoneNumber] TO [MssExec]
GRANT INSERT ON [dbo].[MilitaryCarrierContactPhoneNumber] TO [MssExec]
GRANT DELETE ON [dbo].[MilitaryCarrierContactPhoneNumber] TO [MssExec]
GRANT UPDATE ON [dbo].[MilitaryCarrierContactPhoneNumber] TO [MssExec]
GO