CREATE TABLE [dbo].[ApiServiceHtml]
(
[HtmlKey] [char] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DateCreated] [datetime] NOT NULL,
[CreatedBy] [int] NOT NULL,
[HtmlDoc] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[EncryptionMethod] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[ApiServiceHtml] ADD CONSTRAINT [PK_ApiServiceHtml] PRIMARY KEY NONCLUSTERED ([HtmlKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ApiServiceHtml_CreatedBy] ON [dbo].[ApiServiceHtml] ([CreatedBy]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ApiServiceHtml] ADD CONSTRAINT [FK_ApiServiceHtml_SysUser] FOREIGN KEY ([CreatedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[ApiServiceHtml] TO [MssExec]
GRANT INSERT ON [dbo].[ApiServiceHtml] TO [MssExec]
GRANT DELETE ON [dbo].[ApiServiceHtml] TO [MssExec]
GRANT UPDATE ON [dbo].[ApiServiceHtml] TO [MssExec]
GO