
-- DROP TABLE tl_message;




CREATE TABLE tl_message (
    object_id number(12) NOT NULL ,
    object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
    object_created_date date DEFAULT SYSDATE NOT NULL
    ,
    sent_via varchar2(200) NULL,
    message_content clob NULL,
    is_read char(1) NULL,
    sent_by number(12)  NULL,
    work_flow_message number(12)  NULL,
    job_application_id number(12)  NULL
    );



ALTER TABLE tl_message ADD    
    CONSTRAINT PK_tl_message PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_tl_message_job_application_id 
    ON tl_message (job_application_id);
