You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

tables_sybase.sql 9.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. /*==============================================================================================*/
  2. /* Quartz database tables creation script for Sybase ASE 12.5 */
  3. /* Written by Pertti Laiho (email: pertti.laiho@deio.net), 9th May 2003 */
  4. /* */
  5. /* Compatible with Quartz version 1.1.2 */
  6. /* */
  7. /* Sybase ASE works ok with the SybaseDelegate delegate class. That means in your Quartz properties */
  8. /* file, you'll need to set: */
  9. /* org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.SybaseDelegate */
  10. /*==============================================================================================*/
  11. use your_db_name_here
  12. go
  13. /*==============================================================================*/
  14. /* Clear all tables: */
  15. /*==============================================================================*/
  16. IF OBJECT_ID('QRTZ_FIRED_TRIGGERS') IS NOT NULL
  17. delete from QRTZ_FIRED_TRIGGERS
  18. go
  19. IF OBJECT_ID('QRTZ_PAUSED_TRIGGER_GRPS') IS NOT NULL
  20. delete from QRTZ_PAUSED_TRIGGER_GRPS
  21. go
  22. IF OBJECT_ID('QRTZ_SCHEDULER_STATE') IS NOT NULL
  23. delete from QRTZ_SCHEDULER_STATE
  24. go
  25. IF OBJECT_ID('QRTZ_LOCKS') IS NOT NULL
  26. delete from QRTZ_LOCKS
  27. go
  28. IF OBJECT_ID('QRTZ_SIMPLE_TRIGGERS') IS NOT NULL
  29. delete from QRTZ_SIMPLE_TRIGGERS
  30. go
  31. IF OBJECT_ID('QRTZ_SIMPROP_TRIGGERS') IS NOT NULL
  32. delete from QRTZ_SIMPROP_TRIGGERS
  33. go
  34. IF OBJECT_ID('QRTZ_CRON_TRIGGERS') IS NOT NULL
  35. delete from QRTZ_CRON_TRIGGERS
  36. go
  37. IF OBJECT_ID('QRTZ_BLOB_TRIGGERS') IS NOT NULL
  38. delete from QRTZ_BLOB_TRIGGERS
  39. go
  40. IF OBJECT_ID('QRTZ_TRIGGERS') IS NOT NULL
  41. delete from QRTZ_TRIGGERS
  42. go
  43. IF OBJECT_ID('QRTZ_JOB_DETAILS') IS NOT NULL
  44. delete from QRTZ_JOB_DETAILS
  45. go
  46. IF OBJECT_ID('QRTZ_CALENDARS') IS NOT NULL
  47. delete from QRTZ_CALENDARS
  48. go
  49. /*==============================================================================*/
  50. /* Drop constraints: */
  51. /*==============================================================================*/
  52. alter table QRTZ_TRIGGERS
  53. drop constraint FK_triggers_job_details
  54. go
  55. alter table QRTZ_CRON_TRIGGERS
  56. drop constraint FK_cron_triggers_triggers
  57. go
  58. alter table QRTZ_SIMPLE_TRIGGERS
  59. drop constraint FK_simple_triggers_triggers
  60. go
  61. alter table QRTZ_SIMPROP_TRIGGERS
  62. drop constraint FK_simprop_triggers_triggers
  63. go
  64. alter table QRTZ_BLOB_TRIGGERS
  65. drop constraint FK_blob_triggers_triggers
  66. go
  67. /*==============================================================================*/
  68. /* Drop tables: */
  69. /*==============================================================================*/
  70. drop table QRTZ_FIRED_TRIGGERS
  71. go
  72. drop table QRTZ_PAUSED_TRIGGER_GRPS
  73. go
  74. drop table QRTZ_SCHEDULER_STATE
  75. go
  76. drop table QRTZ_LOCKS
  77. go
  78. drop table QRTZ_SIMPLE_TRIGGERS
  79. go
  80. drop table QRTZ_SIMPROP_TRIGGERS
  81. go
  82. drop table QRTZ_CRON_TRIGGERS
  83. go
  84. drop table QRTZ_BLOB_TRIGGERS
  85. go
  86. drop table QRTZ_TRIGGERS
  87. go
  88. drop table QRTZ_JOB_DETAILS
  89. go
  90. drop table QRTZ_CALENDARS
  91. go
  92. /*==============================================================================*/
  93. /* Create tables: */
  94. /*==============================================================================*/
  95. create table QRTZ_CALENDARS (
  96. SCHED_NAME varchar(120) not null,
  97. CALENDAR_NAME varchar(80) not null,
  98. CALENDAR image not null
  99. )
  100. go
  101. create table QRTZ_CRON_TRIGGERS (
  102. SCHED_NAME varchar(120) not null,
  103. TRIGGER_NAME varchar(80) not null,
  104. TRIGGER_GROUP varchar(80) not null,
  105. CRON_EXPRESSION varchar(120) not null,
  106. TIME_ZONE_ID varchar(80) null,
  107. )
  108. go
  109. create table QRTZ_PAUSED_TRIGGER_GRPS (
  110. SCHED_NAME varchar(120) not null,
  111. TRIGGER_GROUP varchar(80) not null,
  112. )
  113. go
  114. create table QRTZ_FIRED_TRIGGERS(
  115. SCHED_NAME varchar(120) not null,
  116. ENTRY_ID varchar(95) not null,
  117. TRIGGER_NAME varchar(80) not null,
  118. TRIGGER_GROUP varchar(80) not null,
  119. INSTANCE_NAME varchar(80) not null,
  120. FIRED_TIME numeric(13,0) not null,
  121. SCHED_TIME numeric(13,0) not null,
  122. PRIORITY int not null,
  123. STATE varchar(16) not null,
  124. JOB_NAME varchar(80) null,
  125. JOB_GROUP varchar(80) null,
  126. IS_NONCONCURRENT bit not null,
  127. REQUESTS_RECOVERY bit not null,
  128. )
  129. go
  130. create table QRTZ_SCHEDULER_STATE (
  131. SCHED_NAME varchar(120) not null,
  132. INSTANCE_NAME varchar(80) not null,
  133. LAST_CHECKIN_TIME numeric(13,0) not null,
  134. CHECKIN_INTERVAL numeric(13,0) not null,
  135. )
  136. go
  137. create table QRTZ_LOCKS (
  138. SCHED_NAME varchar(120) not null,
  139. LOCK_NAME varchar(40) not null,
  140. )
  141. go
  142. create table QRTZ_JOB_DETAILS (
  143. SCHED_NAME varchar(120) not null,
  144. JOB_NAME varchar(80) not null,
  145. JOB_GROUP varchar(80) not null,
  146. DESCRIPTION varchar(120) null,
  147. JOB_CLASS_NAME varchar(128) not null,
  148. IS_DURABLE bit not null,
  149. IS_NONCONCURRENT bit not null,
  150. IS_UPDATE_DATA bit not null,
  151. REQUESTS_RECOVERY bit not null,
  152. JOB_DATA image null
  153. )
  154. go
  155. create table QRTZ_SIMPLE_TRIGGERS (
  156. SCHED_NAME varchar(120) not null,
  157. TRIGGER_NAME varchar(80) not null,
  158. TRIGGER_GROUP varchar(80) not null,
  159. REPEAT_COUNT numeric(13,0) not null,
  160. REPEAT_INTERVAL numeric(13,0) not null,
  161. TIMES_TRIGGERED numeric(13,0) not null
  162. )
  163. go
  164. CREATE TABLE QRTZ_SIMPROP_TRIGGERS
  165. (
  166. SCHED_NAME VARCHAR(120) NOT NULL,
  167. TRIGGER_NAME VARCHAR(200) NOT NULL,
  168. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  169. STR_PROP_1 VARCHAR(512) NULL,
  170. STR_PROP_2 VARCHAR(512) NULL,
  171. STR_PROP_3 VARCHAR(512) NULL,
  172. INT_PROP_1 INT NULL,
  173. INT_PROP_2 INT NULL,
  174. LONG_PROP_1 NUMERIC(13,0) NULL,
  175. LONG_PROP_2 NUMERIC(13,0) NULL,
  176. DEC_PROP_1 NUMERIC(13,4) NULL,
  177. DEC_PROP_2 NUMERIC(13,4) NULL,
  178. BOOL_PROP_1 bit NOT NULL,
  179. BOOL_PROP_2 bit NOT NULL
  180. )
  181. go
  182. create table QRTZ_BLOB_TRIGGERS (
  183. SCHED_NAME varchar(120) not null,
  184. TRIGGER_NAME varchar(80) not null,
  185. TRIGGER_GROUP varchar(80) not null,
  186. BLOB_DATA image null
  187. )
  188. go
  189. create table QRTZ_TRIGGERS (
  190. SCHED_NAME varchar(120) not null,
  191. TRIGGER_NAME varchar(80) not null,
  192. TRIGGER_GROUP varchar(80) not null,
  193. JOB_NAME varchar(80) not null,
  194. JOB_GROUP varchar(80) not null,
  195. DESCRIPTION varchar(120) null,
  196. NEXT_FIRE_TIME numeric(13,0) null,
  197. PREV_FIRE_TIME numeric(13,0) null,
  198. PRIORITY int null,
  199. TRIGGER_STATE varchar(16) not null,
  200. TRIGGER_TYPE varchar(8) not null,
  201. START_TIME numeric(13,0) not null,
  202. END_TIME numeric(13,0) null,
  203. CALENDAR_NAME varchar(80) null,
  204. MISFIRE_INSTR smallint null,
  205. JOB_DATA image null
  206. )
  207. go
  208. /*==============================================================================*/
  209. /* Create primary key constraints: */
  210. /*==============================================================================*/
  211. alter table QRTZ_CALENDARS
  212. add constraint PK_qrtz_calendars primary key clustered (SCHED_NAME,CALENDAR_NAME)
  213. go
  214. alter table QRTZ_CRON_TRIGGERS
  215. add constraint PK_qrtz_cron_triggers primary key clustered (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP)
  216. go
  217. alter table QRTZ_FIRED_TRIGGERS
  218. add constraint PK_qrtz_fired_triggers primary key clustered (SCHED_NAME,ENTRY_ID)
  219. go
  220. alter table QRTZ_PAUSED_TRIGGER_GRPS
  221. add constraint PK_qrtz_paused_trigger_grps primary key clustered (SCHED_NAME,TRIGGER_GROUP)
  222. go
  223. alter table QRTZ_SCHEDULER_STATE
  224. add constraint PK_qrtz_scheduler_state primary key clustered (SCHED_NAME,INSTANCE_NAME)
  225. go
  226. alter table QRTZ_LOCKS
  227. add constraint PK_qrtz_locks primary key clustered (SCHED_NAME,LOCK_NAME)
  228. go
  229. alter table QRTZ_JOB_DETAILS
  230. add constraint PK_qrtz_job_details primary key clustered (SCHED_NAME,JOB_NAME, JOB_GROUP)
  231. go
  232. alter table QRTZ_SIMPLE_TRIGGERS
  233. add constraint PK_qrtz_simple_triggers primary key clustered (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP)
  234. go
  235. alter table QRTZ_SIMPROP_TRIGGERS
  236. add constraint PK_qrtz_simprop_triggers primary key clustered (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP)
  237. go
  238. alter table QRTZ_TRIGGERS
  239. add constraint PK_qrtz_triggers primary key clustered (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP)
  240. go
  241. alter table QRTZ_BLOB_TRIGGERS
  242. add constraint PK_qrtz_blob_triggers primary key clustered (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP)
  243. go
  244. /*==============================================================================*/
  245. /* Create foreign key constraints: */
  246. /*==============================================================================*/
  247. alter table QRTZ_CRON_TRIGGERS
  248. add constraint FK_cron_triggers_triggers foreign key (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  249. references QRTZ_TRIGGERS (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  250. go
  251. alter table QRTZ_SIMPLE_TRIGGERS
  252. add constraint FK_simple_triggers_triggers foreign key (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  253. references QRTZ_TRIGGERS (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  254. go
  255. alter table QRTZ_SIMPROP_TRIGGERS
  256. add constraint FK_simprop_triggers_triggers foreign key (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  257. references QRTZ_TRIGGERS (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  258. go
  259. alter table QRTZ_TRIGGERS
  260. add constraint FK_triggers_job_details foreign key (SCHED_NAME,JOB_NAME,JOB_GROUP)
  261. references QRTZ_JOB_DETAILS (SCHED_NAME,JOB_NAME,JOB_GROUP)
  262. go
  263. alter table QRTZ_BLOB_TRIGGERS
  264. add constraint FK_blob_triggers_triggers foreign key (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  265. references QRTZ_TRIGGERS (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  266. go
  267. /*==============================================================================*/
  268. /* End of script. */
  269. /*==============================================================================*/

一个用来深度学习并实战 spring boot 的项目,目前总共包含 66 个集成demo,已经完成 55 个。