CREATE TABLE [dbo].[LSInstructions]
(
[LSInstructionsID] [int] NOT NULL IDENTITY(1, 1),
[LSPriKey] [int] NOT NULL,
[SysUserFID] [int] NOT NULL,
[LastModified] [datetime] NOT NULL,
[Instruction] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LSInstructions] ADD CONSTRAINT [PK_LSInstructions] PRIMARY KEY CLUSTERED ([LSInstructionsID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_LSInstructions_LSPriKey] ON [dbo].[LSInstructions] ([LSPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_LSInstructions_SysUserFID] ON [dbo].[LSInstructions] ([SysUserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LSInstructions] ADD CONSTRAINT [FK_LSInstructions_LocServ] FOREIGN KEY ([LSPriKey]) REFERENCES [dbo].[LocServ] ([PriKey]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[LSInstructions] ADD CONSTRAINT [FK_LSInstructions_Sysuser] FOREIGN KEY ([SysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[LSInstructions] TO [MssExec]
GRANT INSERT ON [dbo].[LSInstructions] TO [MssExec]
GRANT DELETE ON [dbo].[LSInstructions] TO [MssExec]
GRANT UPDATE ON [dbo].[LSInstructions] TO [MssExec]
GO