
-- DROP TABLE tl_attachment;



CREATE TABLE tl_attachment (
    object_id int NOT NULL ,
    object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
    object_created_date datetime DEFAULT getdate() NOT NULL
    ,
    attachment_name varchar(100) NULL,
    attachment_file image NULL,
    email_message_id numeric(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);
