如题:
FileSqlManager fm = new FileSqlManager("sql/init_quartz.sql");
List<Sql> sqlList = fm.createCombo(fm.keys());
dao.execute(sqlList.toArray(new Sql[sqlList.size()]));
#
# In your Quartz properties file, you'll need to set
# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
#
#
# By: Ron Cordell - roncordell
# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.
DROP TABLE IF EXISTS SYS_QRTZ_FIRED_TRIGGERS;
DROP TABLE IF EXISTS SYS_QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE IF EXISTS SYS_QRTZ_SCHEDULER_STATE;
DROP TABLE IF EXISTS SYS_QRTZ_LOCKS;
DROP TABLE IF EXISTS SYS_QRTZ_SIMPLE_TRIGGERS;
DROP TABLE IF EXISTS SYS_QRTZ_SIMPROP_TRIGGERS;
DROP TABLE IF EXISTS SYS_QRTZ_CRON_TRIGGERS;
DROP TABLE IF EXISTS SYS_QRTZ_BLOB_TRIGGERS;
DROP TABLE IF EXISTS SYS_QRTZ_TRIGGERS;
DROP TABLE IF EXISTS SYS_QRTZ_JOB_DETAILS;
DROP TABLE IF EXISTS SYS_QRTZ_CALENDARS;
CREATE TABLE SYS_QRTZ_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 VARCHAR(1) NOT NULL,
IS_NONCONCURRENT VARCHAR(1) NOT NULL,
IS_UPDATE_DATA VARCHAR(1) NOT NULL,
REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP))
ENGINE=InnoDB;
CREATE TABLE SYS_QRTZ_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(13) NULL,
PREV_FIRE_TIME BIGINT(13) NULL,
PRIORITY INTEGER NULL,
TRIGGER_STATE VARCHAR(16) NOT NULL,
TRIGGER_TYPE VARCHAR(8) NOT NULL,
START_TIME BIGINT(13) NOT NULL,
END_TIME BIGINT(13) NULL,
CALENDAR_NAME VARCHAR(200) NULL,
MISFIRE_INSTR SMALLINT(2) NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
REFERENCES SYS_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP))
ENGINE=InnoDB;
[INFO ] 11:10:37.893 org.nutz.dao.impl.FileSqlManager.add(FileSqlManager.java:109) - skip not key sql line JOB_GROUP VARCHAR(200) NOT NULL,
[INFO ] 11:10:37.894 org.nutz.dao.impl.FileSqlManager.add(FileSqlManager.java:109) - skip not key sql line DESCRIPTION VARCHAR(250) NULL,
[INFO ] 11:10:37.894 org.nutz.dao.impl.FileSqlManager.add(FileSqlManager.java:109) - skip not key sql line JOB_CLASS_NAME VARCHAR(250) NOT NULL,
[INFO ] 11:10:37.895 org.nutz.dao.impl.FileSqlManager.add(FileSqlManager.java:109) - skip not key sql line IS_DURABLE VARCHAR(1) NOT NULL,
[INFO ] 11:10:37.895 org.nutz.dao.impl.FileSqlManager.add(FileSqlManager.java:109) - skip not key sql line IS_NONCONCURRENT VARCHAR(1) NOT NULL,
[INFO ] 11:10:37.896 org.nutz.dao.impl.FileSqlManager.add(FileSqlManager.java:109) - skip not key sql line IS_UPDATE_DATA VARCHAR(1) NOT NULL,
[INFO ] 11:10:37.896 org.nutz.dao.impl.FileSqlManager.add(FileSqlManager.java:109) - skip not key sql line REQUESTS_RECOVERY VARCHAR(1) NOT NULL,