[dbo].[SafetySystemPersonnel]
CREATE TABLE [dbo].[SafetySystemPersonnel]
(
[SafetySystemPersonnelID] [int] NOT NULL IDENTITY(1, 1),
[SysuserFID] [int] NOT NULL,
[LastPhysicalDate] [datetime] NULL,
[NextPhysicalDate] [datetime] NULL,
[LicenseExpiresDate] [datetime] NULL,
[AdministrativeHoldFlag] [bit] NOT NULL CONSTRAINT [DF_SafetySystemPersonnel_AdministrativeHoldFlag] DEFAULT ((0)),
[LastMVRDate] [datetime] NULL,
[NextMVRDate] [datetime] NULL,
[LastBackgroundCheckDate] [datetime] NULL,
[NextBackgroundCheckDate] [datetime] NULL,
[BackgroundCheckCID] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LicenseNumber] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LicenseClass] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SafetySystemPersonnel] ADD CONSTRAINT [PK_SafetySystemPersonnel] PRIMARY KEY NONCLUSTERED ([SafetySystemPersonnelID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_SafetySystemPersonnel_SysuserFID] ON [dbo].[SafetySystemPersonnel] ([SysuserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SafetySystemPersonnel] ADD CONSTRAINT [FK_SafetySystemPersonnel_Sysuser] FOREIGN KEY ([SysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[SafetySystemPersonnel] TO [MssExec]
GRANT INSERT ON [dbo].[SafetySystemPersonnel] TO [MssExec]
GRANT DELETE ON [dbo].[SafetySystemPersonnel] TO [MssExec]
GRANT UPDATE ON [dbo].[SafetySystemPersonnel] TO [MssExec]
GO