[dbo].[DocumentAutoUploadRule]
CREATE TABLE [dbo].[DocumentAutoUploadRule]
(
[DocumentAutoUploadRuleID] [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].[DocumentAutoUploadRule] ADD CONSTRAINT [PK_DocumentAutoUploadRule] PRIMARY KEY CLUSTERED ([DocumentAutoUploadRuleID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentAutoUploadRule] ADD CONSTRAINT [IX_DocumentAutoUploadRule_RuleDescription] UNIQUE NONCLUSTERED ([RuleDescription]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DocumentAutoUploadRule_XmlInterface] ON [dbo].[DocumentAutoUploadRule] ([XmlInterfaceFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DocumentAutoUploadRule] ADD CONSTRAINT [FK_DocumentAutoUploadRule_XmlInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[DocumentAutoUploadRule] TO [MssExec]
GRANT INSERT ON [dbo].[DocumentAutoUploadRule] TO [MssExec]
GRANT DELETE ON [dbo].[DocumentAutoUploadRule] TO [MssExec]
GRANT UPDATE ON [dbo].[DocumentAutoUploadRule] TO [MssExec]
GO