[dbo].[DocumentAutoDownloadRule]
CREATE TABLE [dbo].[DocumentAutoDownloadRule]
(
[DocumentAutoDownloadRuleID] [int] NOT NULL IDENTITY(1, 1),
[RuleDescription] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[XmlInterfaceFID] [int] NOT NULL,
[Inactive] [bit] NOT NULL,
[Validated] [bit] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentAutoDownloadRule] ADD CONSTRAINT [PK_DocumentAutoDownloadRule] PRIMARY KEY CLUSTERED ([DocumentAutoDownloadRuleID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentAutoDownloadRule] ADD CONSTRAINT [IX_DocumentAutoDownloadRule_RuleDescription] UNIQUE NONCLUSTERED ([RuleDescription]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DocumentAutoDownloadRule_XmlInterface] ON [dbo].[DocumentAutoDownloadRule] ([XmlInterfaceFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentAutoDownloadRule] ADD CONSTRAINT [FK_DocumentAutoDownloadRule_XmlInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[DocumentAutoDownloadRule] TO [MssExec]
GRANT INSERT ON [dbo].[DocumentAutoDownloadRule] TO [MssExec]
GRANT DELETE ON [dbo].[DocumentAutoDownloadRule] TO [MssExec]
GRANT UPDATE ON [dbo].[DocumentAutoDownloadRule] TO [MssExec]
GO