
-- @AutoRun
-- drop table rs_level_factor;



CREATE TABLE rs_level_factor (
    object_id numeric(12) NOT NULL ,
    object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
    object_created_date timestamp DEFAULT NOW() NOT NULL
    ,
    from_score numeric(12) NULL,
    to_score numeric(12) NULL,
    color_code varchar(200) NULL,
    factor_number numeric(12)  NULL,
    level_number numeric(12)  NULL,
    narrative_id numeric(12)  NULL
    );



ALTER TABLE rs_level_factor ADD    
    CONSTRAINT pk_rs_level_factor PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_rs_level_factor_factor_number 
    ON rs_level_factor (factor_number);

    CREATE INDEX idx_rs_level_factor_level_number 
    ON rs_level_factor (level_number);

    CREATE INDEX idx_rs_level_factor_narrative_id 
    ON rs_level_factor (narrative_id);
