CREATE TABLE [dbo].[SysuserLocation]
(
[SysuserLocationID] [int] NOT NULL IDENTITY(1, 1),
[SysuserFID] [int] NOT NULL,
[LastLocationCity] [dbo].[AddressCity] NULL,
[LastLocationState] [dbo].[AddressState] NULL,
[LastLocationDate] [datetime] NULL,
[NextLocationCity] [dbo].[AddressCity] NULL,
[NextLocationState] [dbo].[AddressState] NULL,
[NextLocationDate] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SysuserLocation] ADD CONSTRAINT [PK_SysuserLocation] PRIMARY KEY NONCLUSTERED ([SysuserLocationID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SysuserLocation] ADD CONSTRAINT [FK_SysuserLocation_Sysuser] FOREIGN KEY ([SysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[SysuserLocation] TO [MssExec]
GRANT INSERT ON [dbo].[SysuserLocation] TO [MssExec]
GRANT DELETE ON [dbo].[SysuserLocation] TO [MssExec]
GRANT UPDATE ON [dbo].[SysuserLocation] TO [MssExec]
GO