
-- @AutoRun
-- drop table tl_occupation;



CREATE TABLE tl_occupation (
    object_id numeric(12) NOT NULL ,
    object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
    object_created_date timestamp DEFAULT NOW() NOT NULL
    ,
    code varchar(4) NOT NULL,
    name varchar(250) NOT NULL,
    level varchar(200) NOT NULL,
    assessment_type varchar(200) NULL,
    assessment_level_id numeric(12)  NULL,
    parent_occupation_id numeric(12)  NULL
    );



ALTER TABLE tl_occupation ADD    
    CONSTRAINT pk_tl_occupation PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_tl_occupation_parent_occupation_id 
    ON tl_occupation (parent_occupation_id);
