[dbo].[MobileCrewTimeActivity]
CREATE TABLE [dbo].[MobileCrewTimeActivity]
(
[MobileCrewTimeActivityID] [int] NOT NULL IDENTITY(1, 1),
[ActivityDescription] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MobileDescription] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[IsDefaultActivity] [bit] NOT NULL CONSTRAINT [DF_MobileCrewTimeActivity_IsDefaultActivity] DEFAULT ((0)),
[ActivityCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_MobileCrewTimeActivity_Inactive] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileCrewTimeActivity] ADD CONSTRAINT [CK_MobileCrewTimeActivity_IsDefaultActivity] CHECK (((0)=[dbo].[CheckForMultipleDefaultCrewActivity]([MobileCrewTimeActivityID],[IsDefaultActivity])))
GO
ALTER TABLE [dbo].[MobileCrewTimeActivity] ADD CONSTRAINT [PK_MobileCrewTimeActivity] PRIMARY KEY CLUSTERED ([MobileCrewTimeActivityID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileCrewTimeActivity] ADD CONSTRAINT [IX_MobileCrewTimeActivity_CrewMemberFID] UNIQUE NONCLUSTERED ([ActivityDescription]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileCrewTimeActivity] ADD CONSTRAINT [IX_MobileCrewTimeActivity_MobileDescription] UNIQUE NONCLUSTERED ([MobileDescription]) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[MobileCrewTimeActivity] TO [MssExec]
GRANT INSERT ON [dbo].[MobileCrewTimeActivity] TO [MssExec]
GRANT DELETE ON [dbo].[MobileCrewTimeActivity] TO [MssExec]
GRANT UPDATE ON [dbo].[MobileCrewTimeActivity] TO [MssExec]
GO