
-- DROP TABLE tl_email_message;



CREATE TABLE tl_email_message (
    object_id int NOT NULL ,
    object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
    object_created_date datetime DEFAULT getdate() 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 datetime NOT NULL,
    job_id numeric(12)  NULL
    );



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