powerjob.sql 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. -- pj_app_info definition
  2. -- Drop table
  3. -- DROP TABLE pj_app_info;
  4. CREATE TABLE pj_app_info (
  5. id int8 NOT NULL,
  6. app_name varchar(255) NULL,
  7. current_server varchar(255) NULL,
  8. gmt_create timestamp NULL,
  9. gmt_modified timestamp NULL,
  10. "password" varchar(255) NULL,
  11. CONSTRAINT pj_app_info_pkey PRIMARY KEY (id),
  12. CONSTRAINT uidx01_app_info UNIQUE (app_name)
  13. );
  14. INSERT INTO pj_app_info VALUES(1, 'ruoyi-worker', '127.0.0.1:10010', '2023-06-13 16:32:59.263', '2023-07-04 17:25:49.798', '123456');
  15. -- pj_container_info definition
  16. -- Drop table
  17. -- DROP TABLE pj_container_info;
  18. CREATE TABLE pj_container_info (
  19. id int8 NOT NULL,
  20. app_id int8 NULL,
  21. container_name varchar(255) NULL,
  22. gmt_create timestamp NULL,
  23. gmt_modified timestamp NULL,
  24. last_deploy_time timestamp NULL,
  25. source_info varchar(255) NULL,
  26. source_type int4 NULL,
  27. status int4 NULL,
  28. "version" varchar(255) NULL,
  29. CONSTRAINT pj_container_info_pkey PRIMARY KEY (id)
  30. );
  31. CREATE INDEX idx01_container_info ON pj_container_info USING btree (app_id);
  32. -- pj_instance_info definition
  33. -- Drop table
  34. -- DROP TABLE pj_instance_info;
  35. CREATE TABLE pj_instance_info (
  36. id int8 NOT NULL,
  37. actual_trigger_time int8 NULL,
  38. app_id int8 NULL,
  39. expected_trigger_time int8 NULL,
  40. finished_time int8 NULL,
  41. gmt_create timestamp NULL,
  42. gmt_modified timestamp NULL,
  43. instance_id int8 NULL,
  44. instance_params oid NULL,
  45. job_id int8 NULL,
  46. job_params oid NULL,
  47. last_report_time int8 NULL,
  48. "result" oid NULL,
  49. running_times int8 NULL,
  50. status int4 NULL,
  51. task_tracker_address varchar(255) NULL,
  52. "type" int4 NULL,
  53. wf_instance_id int8 NULL,
  54. CONSTRAINT pj_instance_info_pkey PRIMARY KEY (id)
  55. );
  56. CREATE INDEX idx01_instance_info ON pj_instance_info USING btree (job_id, status);
  57. CREATE INDEX idx02_instance_info ON pj_instance_info USING btree (app_id, status);
  58. CREATE INDEX idx03_instance_info ON pj_instance_info USING btree (instance_id, status);
  59. -- pj_job_info definition
  60. -- Drop table
  61. -- DROP TABLE pj_job_info;
  62. CREATE TABLE pj_job_info (
  63. id int8 NOT NULL,
  64. alarm_config varchar(255) NULL,
  65. app_id int8 NULL,
  66. concurrency int4 NULL,
  67. designated_workers varchar(255) NULL,
  68. dispatch_strategy int4 NULL,
  69. execute_type int4 NULL,
  70. extra varchar(255) NULL,
  71. gmt_create timestamp NULL,
  72. gmt_modified timestamp NULL,
  73. instance_retry_num int4 NULL,
  74. instance_time_limit int8 NULL,
  75. job_description varchar(255) NULL,
  76. job_name varchar(255) NULL,
  77. job_params oid NULL,
  78. lifecycle varchar(255) NULL,
  79. log_config varchar(255) NULL,
  80. max_instance_num int4 NULL,
  81. max_worker_count int4 NULL,
  82. min_cpu_cores float8 NOT NULL,
  83. min_disk_space float8 NOT NULL,
  84. min_memory_space float8 NOT NULL,
  85. next_trigger_time int8 NULL,
  86. notify_user_ids varchar(255) NULL,
  87. processor_info varchar(255) NULL,
  88. processor_type int4 NULL,
  89. status int4 NULL,
  90. tag varchar(255) NULL,
  91. task_retry_num int4 NULL,
  92. time_expression varchar(255) NULL,
  93. time_expression_type int4 NULL,
  94. CONSTRAINT pj_job_info_pkey PRIMARY KEY (id)
  95. );
  96. CREATE INDEX idx01_job_info ON pj_job_info USING btree (app_id, status, time_expression_type, next_trigger_time);
  97. INSERT INTO pj_job_info VALUES(1, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 2, 1, NULL, '2023-06-02 15:01:27.717', '2023-07-04 17:22:12.374', 1, 0, '', '单机处理器执行测试', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', 1, 2, NULL, 1, '30000', 3);
  98. INSERT INTO pj_job_info VALUES(2, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 1, 2, NULL, '2023-06-02 15:04:45.342', '2023-07-04 17:22:12.816', 0, 0, NULL, '广播处理器测试', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', 1, 2, NULL, 1, '30000', 3);
  99. INSERT INTO pj_job_info VALUES(3, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 1, 4, NULL, '2023-06-02 15:13:23.519', '2023-06-02 16:03:22.421', 0, 0, NULL, 'Map处理器测试', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', 1, 2, NULL, 1, '1000', 3);
  100. INSERT INTO pj_job_info VALUES(4, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 1, 3, NULL, '2023-06-02 15:45:25.896', '2023-06-02 16:03:23.125', 0, 0, NULL, 'MapReduce处理器测试', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', 1, 2, NULL, 1, '1000', 3);
  101. -- pj_oms_lock definition
  102. -- Drop table
  103. -- DROP TABLE pj_oms_lock;
  104. CREATE TABLE pj_oms_lock (
  105. id int8 NOT NULL,
  106. gmt_create timestamp NULL,
  107. gmt_modified timestamp NULL,
  108. lock_name varchar(255) NULL,
  109. max_lock_time int8 NULL,
  110. ownerip varchar(255) NULL,
  111. CONSTRAINT pj_oms_lock_pkey PRIMARY KEY (id),
  112. CONSTRAINT uidx01_oms_lock UNIQUE (lock_name)
  113. );
  114. -- pj_server_info definition
  115. -- Drop table
  116. -- DROP TABLE pj_server_info;
  117. CREATE TABLE pj_server_info (
  118. id int8 NOT NULL,
  119. gmt_create timestamp NULL,
  120. gmt_modified timestamp NULL,
  121. ip varchar(255) NULL,
  122. CONSTRAINT pj_server_info_pkey PRIMARY KEY (id),
  123. CONSTRAINT uidx01_server_info UNIQUE (ip)
  124. );
  125. CREATE INDEX idx01_server_info ON pj_server_info USING btree (gmt_modified);
  126. -- pj_user_info definition
  127. -- Drop table
  128. -- DROP TABLE pj_user_info;
  129. CREATE TABLE pj_user_info (
  130. id int8 NOT NULL,
  131. email varchar(255) NULL,
  132. extra varchar(255) NULL,
  133. gmt_create timestamp NULL,
  134. gmt_modified timestamp NULL,
  135. "password" varchar(255) NULL,
  136. phone varchar(255) NULL,
  137. username varchar(255) NULL,
  138. web_hook varchar(255) NULL,
  139. CONSTRAINT pj_user_info_pkey PRIMARY KEY (id)
  140. );
  141. CREATE INDEX uidx01_user_info ON pj_user_info USING btree (username);
  142. CREATE INDEX uidx02_user_info ON pj_user_info USING btree (email);
  143. -- pj_workflow_info definition
  144. -- Drop table
  145. -- DROP TABLE pj_workflow_info;
  146. CREATE TABLE pj_workflow_info (
  147. id int8 NOT NULL,
  148. app_id int8 NULL,
  149. extra varchar(255) NULL,
  150. gmt_create timestamp NULL,
  151. gmt_modified timestamp NULL,
  152. lifecycle varchar(255) NULL,
  153. max_wf_instance_num int4 NULL,
  154. next_trigger_time int8 NULL,
  155. notify_user_ids varchar(255) NULL,
  156. pedag oid NULL,
  157. status int4 NULL,
  158. time_expression varchar(255) NULL,
  159. time_expression_type int4 NULL,
  160. wf_description varchar(255) NULL,
  161. wf_name varchar(255) NULL,
  162. CONSTRAINT pj_workflow_info_pkey PRIMARY KEY (id)
  163. );
  164. CREATE INDEX idx01_workflow_info ON pj_workflow_info USING btree (app_id, status, time_expression_type, next_trigger_time);
  165. -- pj_workflow_instance_info definition
  166. -- Drop table
  167. -- DROP TABLE pj_workflow_instance_info;
  168. CREATE TABLE pj_workflow_instance_info (
  169. id int8 NOT NULL,
  170. actual_trigger_time int8 NULL,
  171. app_id int8 NULL,
  172. dag oid NULL,
  173. expected_trigger_time int8 NULL,
  174. finished_time int8 NULL,
  175. gmt_create timestamp NULL,
  176. gmt_modified timestamp NULL,
  177. parent_wf_instance_id int8 NULL,
  178. "result" oid NULL,
  179. status int4 NULL,
  180. wf_context oid NULL,
  181. wf_init_params oid NULL,
  182. wf_instance_id int8 NULL,
  183. workflow_id int8 NULL,
  184. CONSTRAINT pj_workflow_instance_info_pkey PRIMARY KEY (id),
  185. CONSTRAINT uidx01_wf_instance UNIQUE (wf_instance_id)
  186. );
  187. CREATE INDEX idx01_wf_instance ON pj_workflow_instance_info USING btree (workflow_id, status, app_id, expected_trigger_time);
  188. -- pj_workflow_node_info definition
  189. -- Drop table
  190. -- DROP TABLE pj_workflow_node_info;
  191. CREATE TABLE pj_workflow_node_info (
  192. id int8 NOT NULL,
  193. app_id int8 NOT NULL,
  194. "enable" bool NOT NULL,
  195. extra oid NULL,
  196. gmt_create timestamp NOT NULL,
  197. gmt_modified timestamp NOT NULL,
  198. job_id int8 NULL,
  199. node_name varchar(255) NULL,
  200. node_params oid NULL,
  201. skip_when_failed bool NOT NULL,
  202. "type" int4 NULL,
  203. workflow_id int8 NULL,
  204. CONSTRAINT pj_workflow_node_info_pkey PRIMARY KEY (id)
  205. );
  206. CREATE INDEX idx01_workflow_node_info ON pj_workflow_node_info USING btree (workflow_id, gmt_create);