text: 
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}job_details;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}job_details (
  
    SCHED_NAME        varchar(120) NOT NULL,
    JOB_NAME          varchar(200) NOT NULL,
    JOB_GROUP         varchar(200) NOT NULL,
    DESCRIPTION       varchar(250) NULL,
    JOB_CLASS_NAME    varchar(250) NOT NULL,
  
    IS_DURABLE        bool         NOT NULL,
    IS_NONCONCURRENT  bool         NOT NULL,
    IS_UPDATE_DATA    bool         NOT NULL,
    REQUESTS_RECOVERY bool         NOT NULL,
  
    JOB_DATA          bytea        NULL,
  
    PRIMARY KEY (SCHED_NAME, JOB_NAME, JOB_GROUP)
  );
  
  CREATE INDEX idx_${quartz_table_prefix}j_req_recovery
    ON ${quartz_schema_name}.${quartz_table_prefix}job_details (SCHED_NAME, REQUESTS_RECOVERY);
  CREATE INDEX idx_${quartz_table_prefix}j_grp
    ON ${quartz_schema_name}.${quartz_table_prefix}job_details (SCHED_NAME, JOB_GROUP);
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}triggers;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}triggers (
  
    SCHED_NAME     varchar(120) NOT NULL,
    TRIGGER_NAME   varchar(200) NOT NULL,
    TRIGGER_GROUP  varchar(200) NOT NULL,
    JOB_NAME       varchar(200) NOT NULL,
    JOB_GROUP      varchar(200) NOT NULL,
    DESCRIPTION    varchar(250) NULL,
  
    NEXT_FIRE_TIME bigint       NULL,
    PREV_FIRE_TIME bigint       NULL,
    PRIORITY       integer      NULL,
    TRIGGER_STATE  varchar(16)  NOT NULL,
    TRIGGER_TYPE   varchar(8)   NOT NULL,
    START_TIME     bigint       NOT NULL,
    END_TIME       bigint       NULL,
    CALENDAR_NAME  varchar(200) NULL,
    MISFIRE_INSTR  smallint     NULL,
  
    JOB_DATA       BYTEA        NULL,
  
    PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
    FOREIGN KEY (SCHED_NAME, JOB_NAME, JOB_GROUP)
    REFERENCES ${quartz_schema_name}.${quartz_table_prefix}job_details (SCHED_NAME, JOB_NAME, JOB_GROUP)
  );
  
  CREATE INDEX idx_${quartz_table_prefix}t_j
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, JOB_NAME, JOB_GROUP);
  CREATE INDEX idx_${quartz_table_prefix}t_jg
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, JOB_GROUP);
  CREATE INDEX idx_${quartz_table_prefix}t_c
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, CALENDAR_NAME);
  CREATE INDEX idx_${quartz_table_prefix}t_g
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, TRIGGER_GROUP);
  CREATE INDEX idx_${quartz_table_prefix}t_state
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, TRIGGER_STATE);
  CREATE INDEX idx_${quartz_table_prefix}t_n_state
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP, TRIGGER_STATE);
  CREATE INDEX idx_${quartz_table_prefix}t_n_g_state
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, TRIGGER_GROUP, TRIGGER_STATE);
  CREATE INDEX idx_${quartz_table_prefix}t_next_fire_time
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, NEXT_FIRE_TIME);
  CREATE INDEX idx_${quartz_table_prefix}t_nft_st
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, TRIGGER_STATE, NEXT_FIRE_TIME);
  CREATE INDEX idx_${quartz_table_prefix}t_nft_misfire
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, MISFIRE_INSTR, NEXT_FIRE_TIME);
  CREATE INDEX idx_${quartz_table_prefix}t_nft_st_misfire
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, MISFIRE_INSTR, NEXT_FIRE_TIME, TRIGGER_STATE);
  CREATE INDEX idx_${quartz_table_prefix}t_nft_st_misfire_grp
    ON ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, MISFIRE_INSTR, NEXT_FIRE_TIME, TRIGGER_GROUP, TRIGGER_STATE);
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}simple_triggers;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}simple_triggers (
  
    SCHED_NAME      varchar(120) NOT NULL,
    TRIGGER_NAME    varchar(200) NOT NULL,
    TRIGGER_GROUP   varchar(200) NOT NULL,
  
    REPEAT_COUNT    bigint       NOT NULL,
    REPEAT_INTERVAL bigint       NOT NULL,
    TIMES_TRIGGERED bigint       NOT NULL,
  
    PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
    FOREIGN KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
    REFERENCES ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  );
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}cron_triggers;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}cron_triggers (
  
    SCHED_NAME      varchar(120) NOT NULL,
    TRIGGER_NAME    varchar(200) NOT NULL,
    TRIGGER_GROUP   varchar(200) NOT NULL,
  
    CRON_EXPRESSION varchar(120) NOT NULL,
    TIME_ZONE_ID    varchar(80),
  
    PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
    FOREIGN KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
    REFERENCES ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  );
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}simprop_triggers;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}simprop_triggers (
  
    SCHED_NAME    varchar(120)   NOT NULL,
    TRIGGER_NAME  varchar(200)   NOT NULL,
    TRIGGER_GROUP varchar(200)   NOT NULL,
  
    STR_PROP_1    varchar(512)   NULL,
    STR_PROP_2    varchar(512)   NULL,
    STR_PROP_3    varchar(512)   NULL,
    INT_PROP_1    int            NULL,
    INT_PROP_2    int            NULL,
    LONG_PROP_1   bigint         NULL,
    LONG_PROP_2   bigint         NULL,
    DEC_PROP_1    numeric(13, 4) NULL,
    DEC_PROP_2    numeric(13, 4) NULL,
    BOOL_PROP_1   bool           NULL,
    BOOL_PROP_2   bool           NULL,
  
    PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
    FOREIGN KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
    REFERENCES ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  );
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}blob_triggers;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}blob_triggers (
  
    SCHED_NAME    varchar(120) NOT NULL,
    TRIGGER_NAME  varchar(200) NOT NULL,
    TRIGGER_GROUP varchar(200) NOT NULL,
  
    BLOB_DATA     bytea        NULL,
  
    PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
    FOREIGN KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
    REFERENCES ${quartz_schema_name}.${quartz_table_prefix}triggers (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
  );
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}calendars;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}calendars (
  
    SCHED_NAME    varchar(120) NOT NULL,
    CALENDAR_NAME varchar(200) NOT NULL,
    CALENDAR      bytea        NOT NULL,
  
    PRIMARY KEY (SCHED_NAME, CALENDAR_NAME)
  );
  
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}paused_trigger_grps;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}paused_trigger_grps (
  
    SCHED_NAME    varchar(120) NOT NULL,
    TRIGGER_GROUP varchar(200) NOT NULL,
  
    PRIMARY KEY (SCHED_NAME, TRIGGER_GROUP)
  );
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}fired_triggers;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}fired_triggers (
  
    SCHED_NAME        varchar(120) NOT NULL,
    ENTRY_ID          varchar(95)  NOT NULL,
  
    TRIGGER_NAME      varchar(200) NOT NULL,
    TRIGGER_GROUP     varchar(200) NOT NULL,
    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) NULL,
    JOB_GROUP         varchar(200) NULL,
  
    IS_NONCONCURRENT  bool         NULL,
    REQUESTS_RECOVERY bool         NULL,
  
    PRIMARY KEY (SCHED_NAME, ENTRY_ID)
  );
  
  CREATE INDEX idx_${quartz_table_prefix}ft_trig_inst_name
    ON ${quartz_schema_name}.${quartz_table_prefix}fired_triggers (SCHED_NAME, INSTANCE_NAME);
  CREATE INDEX idx_${quartz_table_prefix}ft_inst_job_req_rcvry
    ON ${quartz_schema_name}.${quartz_table_prefix}fired_triggers (SCHED_NAME, INSTANCE_NAME, REQUESTS_RECOVERY);
  CREATE INDEX idx_${quartz_table_prefix}ft_j_g
    ON ${quartz_schema_name}.${quartz_table_prefix}fired_triggers (SCHED_NAME, JOB_NAME, JOB_GROUP);
  CREATE INDEX idx_${quartz_table_prefix}ft_jg
    ON ${quartz_schema_name}.${quartz_table_prefix}fired_triggers (SCHED_NAME, JOB_GROUP);
  CREATE INDEX idx_${quartz_table_prefix}ft_t_g
    ON ${quartz_schema_name}.${quartz_table_prefix}fired_triggers (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP);
  CREATE INDEX idx_${quartz_table_prefix}ft_tg
    ON ${quartz_schema_name}.${quartz_table_prefix}fired_triggers (SCHED_NAME, TRIGGER_GROUP);
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}scheduler_state;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}scheduler_state (
  
    SCHED_NAME        varchar(120) NOT NULL,
    INSTANCE_NAME     varchar(200) NOT NULL,
  
    LAST_CHECKIN_TIME bigint       NOT NULL,
    CHECKIN_INTERVAL  bigint       NOT NULL,
  
    PRIMARY KEY (SCHED_NAME, INSTANCE_NAME)
  );
  
  DROP TABLE IF EXISTS ${quartz_schema_name}.${quartz_table_prefix}locks;
  CREATE TABLE ${quartz_schema_name}.${quartz_table_prefix}locks (
  
    SCHED_NAME varchar(120) NOT NULL,
    LOCK_NAME  varchar(40)  NOT NULL,
  
    PRIMARY KEY (SCHED_NAME, LOCK_NAME)
  );
  