quartz.sql 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. /*
  2. 注意:仅仅需要 Quartz 定时任务的场景,可选!!!
  3. Date: 30/04/2024 09:54:18
  4. */
  5. -- ----------------------------
  6. -- Table structure for QRTZ_BLOB_TRIGGERS
  7. -- ----------------------------
  8. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_BLOB_TRIGGERS]') AND type IN ('U'))
  9. DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS]
  10. GO
  11. CREATE TABLE [dbo].[QRTZ_BLOB_TRIGGERS] (
  12. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  13. [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  14. [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  15. [BLOB_DATA] varbinary(max) NULL
  16. )
  17. GO
  18. ALTER TABLE [dbo].[QRTZ_BLOB_TRIGGERS] SET (LOCK_ESCALATION = TABLE)
  19. GO
  20. -- ----------------------------
  21. -- Records of QRTZ_BLOB_TRIGGERS
  22. -- ----------------------------
  23. BEGIN TRANSACTION
  24. GO
  25. COMMIT
  26. GO
  27. -- ----------------------------
  28. -- Table structure for QRTZ_CALENDARS
  29. -- ----------------------------
  30. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_CALENDARS]') AND type IN ('U'))
  31. DROP TABLE [dbo].[QRTZ_CALENDARS]
  32. GO
  33. CREATE TABLE [dbo].[QRTZ_CALENDARS] (
  34. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  35. [CALENDAR_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  36. [CALENDAR] varbinary(max) NOT NULL
  37. )
  38. GO
  39. ALTER TABLE [dbo].[QRTZ_CALENDARS] SET (LOCK_ESCALATION = TABLE)
  40. GO
  41. -- ----------------------------
  42. -- Records of QRTZ_CALENDARS
  43. -- ----------------------------
  44. BEGIN TRANSACTION
  45. GO
  46. COMMIT
  47. GO
  48. -- ----------------------------
  49. -- Table structure for QRTZ_CRON_TRIGGERS
  50. -- ----------------------------
  51. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_CRON_TRIGGERS]') AND type IN ('U'))
  52. DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS]
  53. GO
  54. CREATE TABLE [dbo].[QRTZ_CRON_TRIGGERS] (
  55. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  56. [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  57. [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  58. [CRON_EXPRESSION] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  59. [TIME_ZONE_ID] varchar(80) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  60. )
  61. GO
  62. ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] SET (LOCK_ESCALATION = TABLE)
  63. GO
  64. -- ----------------------------
  65. -- Records of QRTZ_CRON_TRIGGERS
  66. -- ----------------------------
  67. BEGIN TRANSACTION
  68. GO
  69. GO
  70. COMMIT
  71. GO
  72. -- ----------------------------
  73. -- Table structure for QRTZ_FIRED_TRIGGERS
  74. -- ----------------------------
  75. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_FIRED_TRIGGERS]') AND type IN ('U'))
  76. DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS]
  77. GO
  78. CREATE TABLE [dbo].[QRTZ_FIRED_TRIGGERS] (
  79. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  80. [ENTRY_ID] varchar(95) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  81. [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  82. [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  83. [INSTANCE_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  84. [FIRED_TIME] bigint NOT NULL,
  85. [SCHED_TIME] bigint NOT NULL,
  86. [PRIORITY] int NOT NULL,
  87. [STATE] varchar(16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  88. [JOB_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  89. [JOB_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  90. [IS_NONCONCURRENT] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  91. [REQUESTS_RECOVERY] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  92. )
  93. GO
  94. ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] SET (LOCK_ESCALATION = TABLE)
  95. GO
  96. -- ----------------------------
  97. -- Records of QRTZ_FIRED_TRIGGERS
  98. -- ----------------------------
  99. BEGIN TRANSACTION
  100. GO
  101. COMMIT
  102. GO
  103. -- ----------------------------
  104. -- Table structure for QRTZ_JOB_DETAILS
  105. -- ----------------------------
  106. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_JOB_DETAILS]') AND type IN ('U'))
  107. DROP TABLE [dbo].[QRTZ_JOB_DETAILS]
  108. GO
  109. CREATE TABLE [dbo].[QRTZ_JOB_DETAILS] (
  110. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  111. [JOB_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  112. [JOB_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  113. [DESCRIPTION] varchar(250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  114. [JOB_CLASS_NAME] varchar(250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  115. [IS_DURABLE] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  116. [IS_NONCONCURRENT] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  117. [IS_UPDATE_DATA] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  118. [REQUESTS_RECOVERY] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  119. [JOB_DATA] varbinary(max) NULL
  120. )
  121. GO
  122. ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] SET (LOCK_ESCALATION = TABLE)
  123. GO
  124. -- ----------------------------
  125. -- Records of QRTZ_JOB_DETAILS
  126. -- ----------------------------
  127. BEGIN TRANSACTION
  128. GO
  129. GO
  130. COMMIT
  131. GO
  132. -- ----------------------------
  133. -- Table structure for QRTZ_LOCKS
  134. -- ----------------------------
  135. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_LOCKS]') AND type IN ('U'))
  136. DROP TABLE [dbo].[QRTZ_LOCKS]
  137. GO
  138. CREATE TABLE [dbo].[QRTZ_LOCKS] (
  139. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  140. [LOCK_NAME] varchar(40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
  141. )
  142. GO
  143. ALTER TABLE [dbo].[QRTZ_LOCKS] SET (LOCK_ESCALATION = TABLE)
  144. GO
  145. -- ----------------------------
  146. -- Records of QRTZ_LOCKS
  147. -- ----------------------------
  148. BEGIN TRANSACTION
  149. GO
  150. COMMIT
  151. GO
  152. -- ----------------------------
  153. -- Table structure for QRTZ_PAUSED_TRIGGER_GRPS
  154. -- ----------------------------
  155. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_PAUSED_TRIGGER_GRPS]') AND type IN ('U'))
  156. DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS]
  157. GO
  158. CREATE TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] (
  159. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  160. [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
  161. )
  162. GO
  163. ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] SET (LOCK_ESCALATION = TABLE)
  164. GO
  165. -- ----------------------------
  166. -- Records of QRTZ_PAUSED_TRIGGER_GRPS
  167. -- ----------------------------
  168. BEGIN TRANSACTION
  169. GO
  170. COMMIT
  171. GO
  172. -- ----------------------------
  173. -- Table structure for QRTZ_SCHEDULER_STATE
  174. -- ----------------------------
  175. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_SCHEDULER_STATE]') AND type IN ('U'))
  176. DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE]
  177. GO
  178. CREATE TABLE [dbo].[QRTZ_SCHEDULER_STATE] (
  179. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  180. [INSTANCE_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  181. [LAST_CHECKIN_TIME] bigint NOT NULL,
  182. [CHECKIN_INTERVAL] bigint NOT NULL
  183. )
  184. GO
  185. ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] SET (LOCK_ESCALATION = TABLE)
  186. GO
  187. -- ----------------------------
  188. -- Records of QRTZ_SCHEDULER_STATE
  189. -- ----------------------------
  190. BEGIN TRANSACTION
  191. GO
  192. COMMIT
  193. GO
  194. -- ----------------------------
  195. -- Table structure for QRTZ_SIMPLE_TRIGGERS
  196. -- ----------------------------
  197. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_SIMPLE_TRIGGERS]') AND type IN ('U'))
  198. DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS]
  199. GO
  200. CREATE TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] (
  201. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  202. [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  203. [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  204. [REPEAT_COUNT] bigint NOT NULL,
  205. [REPEAT_INTERVAL] bigint NOT NULL,
  206. [TIMES_TRIGGERED] bigint NOT NULL
  207. )
  208. GO
  209. ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] SET (LOCK_ESCALATION = TABLE)
  210. GO
  211. -- ----------------------------
  212. -- Records of QRTZ_SIMPLE_TRIGGERS
  213. -- ----------------------------
  214. BEGIN TRANSACTION
  215. GO
  216. COMMIT
  217. GO
  218. -- ----------------------------
  219. -- Table structure for QRTZ_SIMPROP_TRIGGERS
  220. -- ----------------------------
  221. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_SIMPROP_TRIGGERS]') AND type IN ('U'))
  222. DROP TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS]
  223. GO
  224. CREATE TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] (
  225. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  226. [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  227. [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  228. [STR_PROP_1] varchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  229. [STR_PROP_2] varchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  230. [STR_PROP_3] varchar(512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  231. [INT_PROP_1] int NULL,
  232. [INT_PROP_2] int NULL,
  233. [LONG_PROP_1] bigint NULL,
  234. [LONG_PROP_2] bigint NULL,
  235. [DEC_PROP_1] numeric(13,4) NULL,
  236. [DEC_PROP_2] numeric(13,4) NULL,
  237. [BOOL_PROP_1] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  238. [BOOL_PROP_2] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  239. )
  240. GO
  241. ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] SET (LOCK_ESCALATION = TABLE)
  242. GO
  243. -- ----------------------------
  244. -- Records of QRTZ_SIMPROP_TRIGGERS
  245. -- ----------------------------
  246. BEGIN TRANSACTION
  247. GO
  248. COMMIT
  249. GO
  250. -- ----------------------------
  251. -- Table structure for QRTZ_TRIGGERS
  252. -- ----------------------------
  253. IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGERS]') AND type IN ('U'))
  254. DROP TABLE [dbo].[QRTZ_TRIGGERS]
  255. GO
  256. CREATE TABLE [dbo].[QRTZ_TRIGGERS] (
  257. [SCHED_NAME] varchar(120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  258. [TRIGGER_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  259. [TRIGGER_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  260. [JOB_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  261. [JOB_GROUP] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  262. [DESCRIPTION] varchar(250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  263. [NEXT_FIRE_TIME] bigint NULL,
  264. [PREV_FIRE_TIME] bigint NULL,
  265. [PRIORITY] int NULL,
  266. [TRIGGER_STATE] varchar(16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  267. [TRIGGER_TYPE] varchar(8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
  268. [START_TIME] bigint NOT NULL,
  269. [END_TIME] bigint NULL,
  270. [CALENDAR_NAME] varchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  271. [MISFIRE_INSTR] smallint NULL,
  272. [JOB_DATA] varbinary(max) NULL
  273. )
  274. GO
  275. ALTER TABLE [dbo].[QRTZ_TRIGGERS] SET (LOCK_ESCALATION = TABLE)
  276. GO
  277. -- ----------------------------
  278. -- Records of QRTZ_TRIGGERS
  279. -- ----------------------------
  280. BEGIN TRANSACTION
  281. GO
  282. COMMIT
  283. GO
  284. -- ----------------------------
  285. -- Primary Key structure for table QRTZ_CALENDARS
  286. -- ----------------------------
  287. ALTER TABLE [dbo].[QRTZ_CALENDARS] ADD CONSTRAINT [PK_QRTZ_CALENDARS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [CALENDAR_NAME])
  288. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  289. ON [PRIMARY]
  290. GO
  291. -- ----------------------------
  292. -- Indexes structure for table QRTZ_CRON_TRIGGERS
  293. -- ----------------------------
  294. CREATE NONCLUSTERED INDEX [IX_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS]
  295. ON [dbo].[QRTZ_CRON_TRIGGERS] (
  296. [SCHED_NAME] ASC,
  297. [TRIGGER_NAME] ASC,
  298. [TRIGGER_GROUP] ASC
  299. )
  300. GO
  301. -- ----------------------------
  302. -- Primary Key structure for table QRTZ_CRON_TRIGGERS
  303. -- ----------------------------
  304. ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_CRON_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP])
  305. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  306. ON [PRIMARY]
  307. GO
  308. -- ----------------------------
  309. -- Primary Key structure for table QRTZ_FIRED_TRIGGERS
  310. -- ----------------------------
  311. ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_FIRED_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [ENTRY_ID])
  312. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  313. ON [PRIMARY]
  314. GO
  315. -- ----------------------------
  316. -- Primary Key structure for table QRTZ_JOB_DETAILS
  317. -- ----------------------------
  318. ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] ADD CONSTRAINT [PK_QRTZ_JOB_DETAILS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [JOB_NAME], [JOB_GROUP])
  319. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  320. ON [PRIMARY]
  321. GO
  322. -- ----------------------------
  323. -- Primary Key structure for table QRTZ_LOCKS
  324. -- ----------------------------
  325. ALTER TABLE [dbo].[QRTZ_LOCKS] ADD CONSTRAINT [PK_QRTZ_LOCKS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [LOCK_NAME])
  326. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  327. ON [PRIMARY]
  328. GO
  329. -- ----------------------------
  330. -- Primary Key structure for table QRTZ_PAUSED_TRIGGER_GRPS
  331. -- ----------------------------
  332. ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] ADD CONSTRAINT [PK_QRTZ_PAUSED_TRIGGER_GRPS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_GROUP])
  333. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  334. ON [PRIMARY]
  335. GO
  336. -- ----------------------------
  337. -- Primary Key structure for table QRTZ_SCHEDULER_STATE
  338. -- ----------------------------
  339. ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] ADD CONSTRAINT [PK_QRTZ_SCHEDULER_STATE] PRIMARY KEY CLUSTERED ([SCHED_NAME], [INSTANCE_NAME])
  340. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  341. ON [PRIMARY]
  342. GO
  343. -- ----------------------------
  344. -- Indexes structure for table QRTZ_SIMPLE_TRIGGERS
  345. -- ----------------------------
  346. CREATE NONCLUSTERED INDEX [IX_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS]
  347. ON [dbo].[QRTZ_SIMPLE_TRIGGERS] (
  348. [SCHED_NAME] ASC,
  349. [TRIGGER_NAME] ASC,
  350. [TRIGGER_GROUP] ASC
  351. )
  352. GO
  353. -- ----------------------------
  354. -- Primary Key structure for table QRTZ_SIMPLE_TRIGGERS
  355. -- ----------------------------
  356. ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_SIMPLE_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP])
  357. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  358. ON [PRIMARY]
  359. GO
  360. -- ----------------------------
  361. -- Indexes structure for table QRTZ_SIMPROP_TRIGGERS
  362. -- ----------------------------
  363. CREATE NONCLUSTERED INDEX [IX_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS]
  364. ON [dbo].[QRTZ_SIMPROP_TRIGGERS] (
  365. [SCHED_NAME] ASC,
  366. [TRIGGER_NAME] ASC,
  367. [TRIGGER_GROUP] ASC
  368. )
  369. GO
  370. -- ----------------------------
  371. -- Primary Key structure for table QRTZ_SIMPROP_TRIGGERS
  372. -- ----------------------------
  373. ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_SIMPROP_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP])
  374. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  375. ON [PRIMARY]
  376. GO
  377. -- ----------------------------
  378. -- Indexes structure for table QRTZ_TRIGGERS
  379. -- ----------------------------
  380. CREATE NONCLUSTERED INDEX [IX_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS]
  381. ON [dbo].[QRTZ_TRIGGERS] (
  382. [SCHED_NAME] ASC,
  383. [TRIGGER_NAME] ASC,
  384. [TRIGGER_GROUP] ASC
  385. )
  386. GO
  387. -- ----------------------------
  388. -- Primary Key structure for table QRTZ_TRIGGERS
  389. -- ----------------------------
  390. ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD CONSTRAINT [PK_QRTZ_TRIGGERS] PRIMARY KEY CLUSTERED ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP])
  391. WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
  392. ON [PRIMARY]
  393. GO
  394. -- ----------------------------
  395. -- Foreign Keys structure for table QRTZ_BLOB_TRIGGERS
  396. -- ----------------------------
  397. ALTER TABLE [dbo].[QRTZ_BLOB_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_BLOB_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION
  398. GO
  399. -- ----------------------------
  400. -- Foreign Keys structure for table QRTZ_CRON_TRIGGERS
  401. -- ----------------------------
  402. ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION
  403. GO
  404. -- ----------------------------
  405. -- Foreign Keys structure for table QRTZ_SIMPLE_TRIGGERS
  406. -- ----------------------------
  407. ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION
  408. GO
  409. -- ----------------------------
  410. -- Foreign Keys structure for table QRTZ_SIMPROP_TRIGGERS
  411. -- ----------------------------
  412. ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) REFERENCES [dbo].[QRTZ_TRIGGERS] ([SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP]) ON DELETE CASCADE ON UPDATE NO ACTION
  413. GO
  414. -- ----------------------------
  415. -- Foreign Keys structure for table QRTZ_TRIGGERS
  416. -- ----------------------------
  417. ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS] FOREIGN KEY ([SCHED_NAME], [JOB_NAME], [JOB_GROUP]) REFERENCES [dbo].[QRTZ_JOB_DETAILS] ([SCHED_NAME], [JOB_NAME], [JOB_GROUP]) ON DELETE NO ACTION ON UPDATE NO ACTION
  418. GO