CREATE TABLE [dbo].[ATProcessImportRule]
(
    [Id] INT IDENTITY(1,1) NOT NULL,
    [ProcessId] INT NOT NULL,
    [DoNotConvert] NVARCHAR(128) NOT NULL,
    [MergeDocuments] BIT NOT NULL DEFAULT 0,
    [ConvertToFormatId] INT NULL,
    [RenameWhenMerged] BIT NOT NULL DEFAULT 0,

    CONSTRAINT PK_ATProcessImportRule PRIMARY KEY ([Id]),

    CONSTRAINT FK_ATProcessImportRule_Process FOREIGN KEY (ProcessId)
        REFERENCES [dbo].[ATProcessDefinition](ProcessID),

    CONSTRAINT FK_ATProcessImportRule_ConvertToFormat FOREIGN KEY (ConvertToFormatId)
        REFERENCES [dbo].[ATImportDocumentType](Id)
);
GO
