-- ----------------------------
-- 8、 存储与已触发的 Trigger 相关的状态信息，以及相联 Job 的执行信息
-- ----------------------------
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;

CREATE TABLE QRTZ_FIRED_TRIGGERS
(
    sched_name        VARCHAR(120) NOT NULL, -- 调度名称
    entry_id          VARCHAR(95)  NOT NULL, -- 调度器实例id
    trigger_name      VARCHAR(200) NOT NULL, -- qrtz_triggers表trigger_name的外键
    trigger_group     VARCHAR(200) NOT NULL, -- qrtz_triggers表trigger_group的外键
    instance_name     VARCHAR(200) NOT NULL, -- 调度器实例名
    fired_time        BIGINT       NOT NULL, -- 触发的时间
    sched_time        BIGINT       NOT NULL, -- 定时器制定的时间
    priority          INTEGER      NOT NULL, -- 优先级
    state             VARCHAR(16)  NOT NULL, -- 状态
    job_name          VARCHAR(200),          -- 任务名称
    job_group         VARCHAR(200),          -- 任务组名
    is_nonconcurrent  VARCHAR(1),            -- 是否并发
    requests_recovery VARCHAR(1),            -- 是否接受恢复执行
    PRIMARY KEY (sched_name, entry_id)       -- 主键
);

COMMENT ON TABLE QRTZ_FIRED_TRIGGERS IS '已触发的触发器表';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.sched_name IS '调度名称';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.entry_id IS '调度器实例id';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.trigger_name IS 'qrtz_triggers表trigger_name的外键';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.trigger_group IS 'qrtz_triggers表trigger_group的外键';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.instance_name IS '调度器实例名';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.fired_time IS '触发的时间';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.sched_time IS '定时器制定的时间';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.priority IS '优先级';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.state IS '状态';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.job_name IS '任务名称';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.job_group IS '任务组名';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.is_nonconcurrent IS '是否并发';
COMMENT ON COLUMN QRTZ_FIRED_TRIGGERS.requests_recovery IS '是否接受恢复执行';








