
-- @AutoRun
-- drop table tl_email_message;



CREATE TABLE tl_email_message (
    object_id numeric(12) NOT NULL ,
    object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
    object_created_date timestamp DEFAULT NOW() NOT NULL
    ,
    message_id varchar(1000) NULL,
    email_from varchar(500) NOT NULL,
    email_to varchar(500) NOT NULL,
    email_cc varchar(500) NULL,
    subject varchar(1000) NULL,
    description text NULL,
    received_date timestamp NOT NULL,
    job_id numeric(12)  NULL
    );



ALTER TABLE tl_email_message ADD    
    CONSTRAINT pk_tl_email_message PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    