[dbo].[MilitaryBaseContact]
CREATE TABLE [dbo].[MilitaryBaseContact]
(
[MilitaryBaseContactID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryBaseFID] [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_MilitaryBaseContact_IsDefault] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryBaseContact] ADD CONSTRAINT [PK_MilitaryBaseContact] PRIMARY KEY CLUSTERED ([MilitaryBaseContactID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MilitaryBaseContact_MilitaryBase] ON [dbo].[MilitaryBaseContact] ([MilitaryBaseFID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_MilitaryBaseContact_MilitaryBase_IsDefault] ON [dbo].[MilitaryBaseContact] ([MilitaryBaseFID]) WHERE ([IsDefault]=(1)) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [ix_MilitaryBaseContacts_MilitaryBase] ON [dbo].[MilitaryBaseContact] ([MilitaryBaseFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryBaseContact] ADD CONSTRAINT [FK_MilitaryBaseContact_MilitaryBase] FOREIGN KEY ([MilitaryBaseFID]) REFERENCES [dbo].[MilitaryBase] ([MilitaryBaseID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[MilitaryBaseContact] TO [MssExec]
GRANT INSERT ON [dbo].[MilitaryBaseContact] TO [MssExec]
GRANT DELETE ON [dbo].[MilitaryBaseContact] TO [MssExec]
GRANT UPDATE ON [dbo].[MilitaryBaseContact] TO [MssExec]
GO