
-- @AutoRun
-- drop table tl_work_flow_message;



CREATE TABLE tl_work_flow_message (
    object_id numeric(12) NOT NULL ,
    object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
    object_created_date timestamp DEFAULT NOW() 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);
