
-- @AutoRun
-- drop table tl_work_flow;



CREATE TABLE tl_work_flow (
    object_id numeric(12) NOT NULL ,
    object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
    object_created_date timestamp DEFAULT NOW() NOT NULL
    ,
    name varchar(20) NOT NULL,
    sort_order numeric(12) NOT NULL,
    application_status varchar(200) NOT NULL,
    job_id numeric(12)  NULL,
    template_id numeric(12)  NULL
    );



ALTER TABLE tl_work_flow ADD    
    CONSTRAINT pk_tl_work_flow PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_tl_work_flow_job_id 
    ON tl_work_flow (job_id);

    CREATE INDEX idx_tl_work_flow_template_id 
    ON tl_work_flow (template_id);
