
-- DROP TABLE tl_attachment;




CREATE TABLE tl_attachment (
    object_id number(12) NOT NULL ,
    object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
    object_created_date date DEFAULT SYSDATE NOT NULL
    ,
    attachment_name varchar2(100) NULL,
    attachment_file blob NULL,
    email_message_id number(12)  NULL
    );



ALTER TABLE tl_attachment ADD    
    CONSTRAINT PK_tl_attachment PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_tl_attachment_email_message_id 
    ON tl_attachment (email_message_id);
