
-- DROP TABLE tl_scheduled_email;




CREATE TABLE tl_scheduled_email (
    object_id number(12) NOT NULL ,
    object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
    object_created_date date DEFAULT SYSDATE NOT NULL
    ,
    subject varchar2(200) NOT NULL,
    scheduled_date date NOT NULL,
    application_status varchar2(200) NOT NULL,
    message_content clob NOT NULL,
    job_application_id number(12)  NOT NULL,
    message_template_id number(12)  NULL
    );



ALTER TABLE tl_scheduled_email ADD    
    CONSTRAINT PK_tl_scheduled_email PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_tl_scheduled_email_job_application_id 
    ON tl_scheduled_email (job_application_id);
