
-- DROP TABLE tl_job_application;



CREATE TABLE tl_job_application (
    object_id int NOT NULL ,
    object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
    object_created_date datetime DEFAULT getdate() NOT NULL
    ,
    cv image NULL,
    application_status varchar(200) NOT NULL,
    submitted_date datetime NULL,
    candidate_id numeric(12)  NOT NULL,
    job_id numeric(12)  NOT NULL
    );



ALTER TABLE tl_job_application ADD    
    CONSTRAINT PK_tl_job_application PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_tl_job_application_candidate_id 
    ON tl_job_application (candidate_id);

    CREATE INDEX idx_tl_job_application_job_id 
    ON tl_job_application (job_id);
