[dbo].[SysuserEmailSignature]
CREATE TABLE [dbo].[SysuserEmailSignature]
(
[SysuserEmailSignatureID] [int] NOT NULL IDENTITY(1, 1),
[SysuserFID] [int] NOT NULL,
[SignatureName] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Signature] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DefaultFlag] [bit] NOT NULL CONSTRAINT [DF_SysuserEmailSignature_DefaultFlag] DEFAULT ((0))
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[SysuserEmailSignature] ADD CONSTRAINT [CK_SysuserEmailSignature_DefaultFlag] CHECK (((1)<>[dbo].[CheckDuplicateDefaultSignatures]([SysuserFID])))
GO
ALTER TABLE [dbo].[SysuserEmailSignature] ADD CONSTRAINT [PK_SysuserEmailSignature] PRIMARY KEY CLUSTERED ([SysuserEmailSignatureID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_SysuserEmailSignature_Sysuser_DefaultFlag] ON [dbo].[SysuserEmailSignature] ([SysuserFID], [DefaultFlag] DESC) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SysuserEmailSignature] ADD CONSTRAINT [FK_SysuserEmailSignature_Sysuser] FOREIGN KEY ([SysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[SysuserEmailSignature] TO [MssExec]
GRANT INSERT ON [dbo].[SysuserEmailSignature] TO [MssExec]
GRANT DELETE ON [dbo].[SysuserEmailSignature] TO [MssExec]
GRANT UPDATE ON [dbo].[SysuserEmailSignature] TO [MssExec]
GO