CREATE TABLE [dbo].[MobileAccess]
(
[MobileAccessID] [int] NOT NULL IDENTITY(1, 1),
[MobileUserTypeFID] [int] NOT NULL,
[SysUserFID] [int] NOT NULL,
[UserID] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Password] [varbinary] (255) NOT NULL,
[MoversSuiteSyncDate] [datetime] NULL,
[MoversConnectMobileUserFID] [int] NULL,
[CellServiceProviderFID] [int] NULL,
[AllowMobilePasswordReset] [bit] NOT NULL CONSTRAINT [DF_MobileAccess_AllowMobilePasswordReset] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileAccess] ADD CONSTRAINT [PK_MobileAccess] PRIMARY KEY CLUSTERED ([MobileAccessID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileAccess] ADD CONSTRAINT [IX_MobileAccess_SysUserFID] UNIQUE NONCLUSTERED ([SysUserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileAccess] ADD CONSTRAINT [IX_MobileAccess_UserID] UNIQUE NONCLUSTERED ([UserID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileAccess] ADD CONSTRAINT [FK_MobileAccess_CellServiceProvider] FOREIGN KEY ([CellServiceProviderFID]) REFERENCES [dbo].[CellServiceProvider] ([CellServiceProviderID])
GO
ALTER TABLE [dbo].[MobileAccess] ADD CONSTRAINT [FK_MobileAccess_MobileUserType] FOREIGN KEY ([MobileUserTypeFID]) REFERENCES [dbo].[MobileUserType] ([MobileUserTypeID])
GO
ALTER TABLE [dbo].[MobileAccess] ADD CONSTRAINT [FK_MobileAccess_SysUser] FOREIGN KEY ([SysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[MobileAccess] TO [MssExec]
GRANT INSERT ON [dbo].[MobileAccess] TO [MssExec]
GRANT DELETE ON [dbo].[MobileAccess] TO [MssExec]
GRANT UPDATE ON [dbo].[MobileAccess] TO [MssExec]
GO