
-- DROP TABLE tl_work_flow_message;



CREATE TABLE tl_work_flow_message (
    object_id int NOT NULL ,
    object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
    object_created_date datetime DEFAULT getdate() NOT NULL
    ,
    delay text NULL,
    variance text NULL,
    business_hours_only char(1) NULL,
    is_withdrawal_message char(1) NULL,
    message_template_id numeric(12)  NULL,
    work_flow_stage_id numeric(12)  NULL
    );



ALTER TABLE tl_work_flow_message ADD    
    CONSTRAINT PK_tl_work_flow_message PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_tl_work_flow_message_work_flow_stage_id 
    ON tl_work_flow_message (work_flow_stage_id);
