-- ============================================================================
-- Table structure for llx_tm_area_skill
-- Defines which skills belong to an area and their TARGET (required) level
-- Replaces llx_tm_position_skill
-- ============================================================================

CREATE TABLE IF NOT EXISTS llx_tm_area_skill (
    rowid          INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
    fk_area        INTEGER NOT NULL,
    fk_skill       INTEGER NOT NULL,
    required_level TINYINT NOT NULL DEFAULT 0,
    sort_order     INTEGER NOT NULL DEFAULT 0,
    tms            TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    fk_user_creat  INTEGER  DEFAULT NULL,
    fk_user_modif  INTEGER  DEFAULT NULL,
    UNIQUE KEY uk_tm_area_skill (fk_area, fk_skill)
) ENGINE=innodb DEFAULT CHARSET=utf8mb4;
