dolphinscheduler_postgresql.sql 93 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
  18. DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
  19. DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
  20. DROP TABLE IF EXISTS QRTZ_LOCKS;
  21. DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
  22. DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
  23. DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
  24. DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
  25. DROP TABLE IF EXISTS QRTZ_TRIGGERS;
  26. DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
  27. DROP TABLE IF EXISTS QRTZ_CALENDARS;
  28. CREATE TABLE QRTZ_JOB_DETAILS (
  29. SCHED_NAME character varying(120) NOT NULL,
  30. JOB_NAME character varying(200) NOT NULL,
  31. JOB_GROUP character varying(200) NOT NULL,
  32. DESCRIPTION character varying(250) NULL,
  33. JOB_CLASS_NAME character varying(250) NOT NULL,
  34. IS_DURABLE boolean NOT NULL,
  35. IS_NONCONCURRENT boolean NOT NULL,
  36. IS_UPDATE_DATA boolean NOT NULL,
  37. REQUESTS_RECOVERY boolean NOT NULL,
  38. JOB_DATA bytea NULL
  39. );
  40. alter table QRTZ_JOB_DETAILS add primary key(SCHED_NAME,JOB_NAME,JOB_GROUP);
  41. CREATE TABLE QRTZ_TRIGGERS (
  42. SCHED_NAME character varying(120) NOT NULL,
  43. TRIGGER_NAME character varying(200) NOT NULL,
  44. TRIGGER_GROUP character varying(200) NOT NULL,
  45. JOB_NAME character varying(200) NOT NULL,
  46. JOB_GROUP character varying(200) NOT NULL,
  47. DESCRIPTION character varying(250) NULL,
  48. NEXT_FIRE_TIME BIGINT NULL,
  49. PREV_FIRE_TIME BIGINT NULL,
  50. PRIORITY INTEGER NULL,
  51. TRIGGER_STATE character varying(16) NOT NULL,
  52. TRIGGER_TYPE character varying(8) NOT NULL,
  53. START_TIME BIGINT NOT NULL,
  54. END_TIME BIGINT NULL,
  55. CALENDAR_NAME character varying(200) NULL,
  56. MISFIRE_INSTR SMALLINT NULL,
  57. JOB_DATA bytea NULL
  58. ) ;
  59. alter table QRTZ_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
  60. CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
  61. SCHED_NAME character varying(120) NOT NULL,
  62. TRIGGER_NAME character varying(200) NOT NULL,
  63. TRIGGER_GROUP character varying(200) NOT NULL,
  64. REPEAT_COUNT BIGINT NOT NULL,
  65. REPEAT_INTERVAL BIGINT NOT NULL,
  66. TIMES_TRIGGERED BIGINT NOT NULL
  67. ) ;
  68. alter table QRTZ_SIMPLE_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
  69. CREATE TABLE QRTZ_CRON_TRIGGERS (
  70. SCHED_NAME character varying(120) NOT NULL,
  71. TRIGGER_NAME character varying(200) NOT NULL,
  72. TRIGGER_GROUP character varying(200) NOT NULL,
  73. CRON_EXPRESSION character varying(120) NOT NULL,
  74. TIME_ZONE_ID character varying(80)
  75. ) ;
  76. alter table QRTZ_CRON_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
  77. CREATE TABLE QRTZ_SIMPROP_TRIGGERS (
  78. SCHED_NAME character varying(120) NOT NULL,
  79. TRIGGER_NAME character varying(200) NOT NULL,
  80. TRIGGER_GROUP character varying(200) NOT NULL,
  81. STR_PROP_1 character varying(512) NULL,
  82. STR_PROP_2 character varying(512) NULL,
  83. STR_PROP_3 character varying(512) NULL,
  84. INT_PROP_1 INT NULL,
  85. INT_PROP_2 INT NULL,
  86. LONG_PROP_1 BIGINT NULL,
  87. LONG_PROP_2 BIGINT NULL,
  88. DEC_PROP_1 NUMERIC(13,4) NULL,
  89. DEC_PROP_2 NUMERIC(13,4) NULL,
  90. BOOL_PROP_1 boolean NULL,
  91. BOOL_PROP_2 boolean NULL
  92. ) ;
  93. alter table QRTZ_SIMPROP_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
  94. CREATE TABLE QRTZ_BLOB_TRIGGERS (
  95. SCHED_NAME character varying(120) NOT NULL,
  96. TRIGGER_NAME character varying(200) NOT NULL,
  97. TRIGGER_GROUP character varying(200) NOT NULL,
  98. BLOB_DATA bytea NULL
  99. ) ;
  100. alter table QRTZ_BLOB_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
  101. CREATE TABLE QRTZ_CALENDARS (
  102. SCHED_NAME character varying(120) NOT NULL,
  103. CALENDAR_NAME character varying(200) NOT NULL,
  104. CALENDAR bytea NOT NULL
  105. ) ;
  106. alter table QRTZ_CALENDARS add primary key(SCHED_NAME,CALENDAR_NAME);
  107. CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
  108. SCHED_NAME character varying(120) NOT NULL,
  109. TRIGGER_GROUP character varying(200) NOT NULL
  110. ) ;
  111. alter table QRTZ_PAUSED_TRIGGER_GRPS add primary key(SCHED_NAME,TRIGGER_GROUP);
  112. CREATE TABLE QRTZ_FIRED_TRIGGERS (
  113. SCHED_NAME character varying(120) NOT NULL,
  114. ENTRY_ID character varying(200) NOT NULL,
  115. TRIGGER_NAME character varying(200) NOT NULL,
  116. TRIGGER_GROUP character varying(200) NOT NULL,
  117. INSTANCE_NAME character varying(200) NOT NULL,
  118. FIRED_TIME BIGINT NOT NULL,
  119. SCHED_TIME BIGINT NOT NULL,
  120. PRIORITY INTEGER NOT NULL,
  121. STATE character varying(16) NOT NULL,
  122. JOB_NAME character varying(200) NULL,
  123. JOB_GROUP character varying(200) NULL,
  124. IS_NONCONCURRENT boolean NULL,
  125. REQUESTS_RECOVERY boolean NULL
  126. ) ;
  127. alter table QRTZ_FIRED_TRIGGERS add primary key(SCHED_NAME,ENTRY_ID);
  128. CREATE TABLE QRTZ_SCHEDULER_STATE (
  129. SCHED_NAME character varying(120) NOT NULL,
  130. INSTANCE_NAME character varying(200) NOT NULL,
  131. LAST_CHECKIN_TIME BIGINT NOT NULL,
  132. CHECKIN_INTERVAL BIGINT NOT NULL
  133. ) ;
  134. alter table QRTZ_SCHEDULER_STATE add primary key(SCHED_NAME,INSTANCE_NAME);
  135. CREATE TABLE QRTZ_LOCKS (
  136. SCHED_NAME character varying(120) NOT NULL,
  137. LOCK_NAME character varying(40) NOT NULL
  138. ) ;
  139. alter table QRTZ_LOCKS add primary key(SCHED_NAME,LOCK_NAME);
  140. CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);
  141. CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP);
  142. CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
  143. CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP);
  144. CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME);
  145. CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
  146. CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE);
  147. CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
  148. CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
  149. CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME);
  150. CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
  151. CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
  152. CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
  153. CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);
  154. CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME);
  155. CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
  156. CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
  157. CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP);
  158. CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
  159. CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
  160. --
  161. -- Table structure for table t_ds_access_token
  162. --
  163. DROP TABLE IF EXISTS t_ds_access_token;
  164. CREATE TABLE t_ds_access_token (
  165. id int NOT NULL ,
  166. user_id int DEFAULT NULL ,
  167. token varchar(64) DEFAULT NULL ,
  168. expire_time timestamp DEFAULT NULL ,
  169. create_time timestamp DEFAULT NULL ,
  170. update_time timestamp DEFAULT NULL ,
  171. PRIMARY KEY (id)
  172. ) ;
  173. --
  174. -- Table structure for table t_ds_alert
  175. --
  176. DROP TABLE IF EXISTS t_ds_alert;
  177. CREATE TABLE t_ds_alert (
  178. id int NOT NULL ,
  179. title varchar(64) DEFAULT NULL ,
  180. content text ,
  181. alert_status int DEFAULT '0' ,
  182. log text ,
  183. alertgroup_id int DEFAULT NULL ,
  184. create_time timestamp DEFAULT NULL ,
  185. update_time timestamp DEFAULT NULL ,
  186. PRIMARY KEY (id)
  187. ) ;
  188. --
  189. -- Table structure for table t_ds_alertgroup
  190. --
  191. DROP TABLE IF EXISTS t_ds_alertgroup;
  192. CREATE TABLE t_ds_alertgroup(
  193. id int NOT NULL,
  194. alert_instance_ids varchar (255) DEFAULT NULL,
  195. create_user_id int4 DEFAULT NULL,
  196. group_name varchar(255) DEFAULT NULL,
  197. description varchar(255) DEFAULT NULL,
  198. create_time timestamp DEFAULT NULL,
  199. update_time timestamp DEFAULT NULL,
  200. PRIMARY KEY (id),
  201. CONSTRAINT t_ds_alertgroup_name_un UNIQUE (group_name)
  202. ) ;
  203. --
  204. -- Table structure for table t_ds_command
  205. --
  206. DROP TABLE IF EXISTS t_ds_command;
  207. CREATE TABLE t_ds_command (
  208. id int NOT NULL ,
  209. command_type int DEFAULT NULL ,
  210. process_definition_code bigint NOT NULL ,
  211. command_param text ,
  212. task_depend_type int DEFAULT NULL ,
  213. failure_strategy int DEFAULT '0' ,
  214. warning_type int DEFAULT '0' ,
  215. warning_group_id int DEFAULT NULL ,
  216. schedule_time timestamp DEFAULT NULL ,
  217. start_time timestamp DEFAULT NULL ,
  218. executor_id int DEFAULT NULL ,
  219. update_time timestamp DEFAULT NULL ,
  220. process_instance_priority int DEFAULT NULL ,
  221. worker_group varchar(64),
  222. environment_code bigint DEFAULT '-1',
  223. dry_run int DEFAULT '0' ,
  224. process_instance_id int DEFAULT 0,
  225. process_definition_version int DEFAULT 0,
  226. PRIMARY KEY (id)
  227. ) ;
  228. create index priority_id_index on t_ds_command (process_instance_priority,id);
  229. --
  230. -- Table structure for table t_ds_datasource
  231. --
  232. DROP TABLE IF EXISTS t_ds_datasource;
  233. CREATE TABLE t_ds_datasource (
  234. id int NOT NULL ,
  235. name varchar(64) NOT NULL ,
  236. note varchar(255) DEFAULT NULL ,
  237. type int NOT NULL ,
  238. user_id int NOT NULL ,
  239. connection_params text NOT NULL ,
  240. create_time timestamp NOT NULL ,
  241. update_time timestamp DEFAULT NULL ,
  242. PRIMARY KEY (id),
  243. CONSTRAINT t_ds_datasource_name_un UNIQUE (name, type)
  244. ) ;
  245. --
  246. -- Table structure for table t_ds_error_command
  247. --
  248. DROP TABLE IF EXISTS t_ds_error_command;
  249. CREATE TABLE t_ds_error_command (
  250. id int NOT NULL ,
  251. command_type int DEFAULT NULL ,
  252. process_definition_code bigint NOT NULL ,
  253. command_param text ,
  254. task_depend_type int DEFAULT NULL ,
  255. failure_strategy int DEFAULT '0' ,
  256. warning_type int DEFAULT '0' ,
  257. warning_group_id int DEFAULT NULL ,
  258. schedule_time timestamp DEFAULT NULL ,
  259. start_time timestamp DEFAULT NULL ,
  260. executor_id int DEFAULT NULL ,
  261. update_time timestamp DEFAULT NULL ,
  262. process_instance_priority int DEFAULT NULL ,
  263. worker_group varchar(64),
  264. environment_code bigint DEFAULT '-1',
  265. dry_run int DEFAULT '0' ,
  266. message text ,
  267. process_instance_id int DEFAULT 0,
  268. process_definition_version int DEFAULT 0,
  269. PRIMARY KEY (id)
  270. );
  271. --
  272. -- Table structure for table t_ds_process_definition
  273. --
  274. DROP TABLE IF EXISTS t_ds_process_definition;
  275. CREATE TABLE t_ds_process_definition (
  276. id int NOT NULL ,
  277. code bigint NOT NULL,
  278. name varchar(255) DEFAULT NULL ,
  279. version int NOT NULL ,
  280. description text ,
  281. project_code bigint DEFAULT NULL ,
  282. release_state int DEFAULT NULL ,
  283. user_id int DEFAULT NULL ,
  284. global_params text ,
  285. locations text ,
  286. warning_group_id int DEFAULT NULL ,
  287. flag int DEFAULT NULL ,
  288. timeout int DEFAULT '0' ,
  289. tenant_id int DEFAULT '-1' ,
  290. execution_type int DEFAULT '0',
  291. create_time timestamp DEFAULT NULL ,
  292. update_time timestamp DEFAULT NULL ,
  293. PRIMARY KEY (id) ,
  294. CONSTRAINT process_definition_unique UNIQUE (name, project_code)
  295. ) ;
  296. create index process_definition_index on t_ds_process_definition (code,id);
  297. --
  298. -- Table structure for table t_ds_process_definition_log
  299. --
  300. DROP TABLE IF EXISTS t_ds_process_definition_log;
  301. CREATE TABLE t_ds_process_definition_log (
  302. id int NOT NULL ,
  303. code bigint NOT NULL,
  304. name varchar(255) DEFAULT NULL ,
  305. version int NOT NULL ,
  306. description text ,
  307. project_code bigint DEFAULT NULL ,
  308. release_state int DEFAULT NULL ,
  309. user_id int DEFAULT NULL ,
  310. global_params text ,
  311. locations text ,
  312. warning_group_id int DEFAULT NULL ,
  313. flag int DEFAULT NULL ,
  314. timeout int DEFAULT '0' ,
  315. tenant_id int DEFAULT '-1' ,
  316. execution_type int DEFAULT '0',
  317. operator int DEFAULT NULL ,
  318. operate_time timestamp DEFAULT NULL ,
  319. create_time timestamp DEFAULT NULL ,
  320. update_time timestamp DEFAULT NULL ,
  321. PRIMARY KEY (id)
  322. ) ;
  323. --
  324. -- Table structure for table t_ds_task_definition
  325. --
  326. DROP TABLE IF EXISTS t_ds_task_definition;
  327. CREATE TABLE t_ds_task_definition (
  328. id int NOT NULL ,
  329. code bigint NOT NULL,
  330. name varchar(255) DEFAULT NULL ,
  331. version int NOT NULL ,
  332. description text ,
  333. project_code bigint DEFAULT NULL ,
  334. user_id int DEFAULT NULL ,
  335. task_type varchar(50) DEFAULT NULL ,
  336. task_params text ,
  337. flag int DEFAULT NULL ,
  338. task_priority int DEFAULT NULL ,
  339. worker_group varchar(255) DEFAULT NULL ,
  340. environment_code bigint DEFAULT '-1',
  341. fail_retry_times int DEFAULT NULL ,
  342. fail_retry_interval int DEFAULT NULL ,
  343. timeout_flag int DEFAULT NULL ,
  344. timeout_notify_strategy int DEFAULT NULL ,
  345. timeout int DEFAULT '0' ,
  346. delay_time int DEFAULT '0' ,
  347. task_group_id int DEFAULT NULL,
  348. task_group_priority int DEFAULT '0',
  349. resource_ids text ,
  350. create_time timestamp DEFAULT NULL ,
  351. update_time timestamp DEFAULT NULL ,
  352. PRIMARY KEY (id)
  353. ) ;
  354. create index task_definition_index on t_ds_task_definition (project_code,id);
  355. --
  356. -- Table structure for table t_ds_task_definition_log
  357. --
  358. DROP TABLE IF EXISTS t_ds_task_definition_log;
  359. CREATE TABLE t_ds_task_definition_log (
  360. id int NOT NULL ,
  361. code bigint NOT NULL,
  362. name varchar(255) DEFAULT NULL ,
  363. version int NOT NULL ,
  364. description text ,
  365. project_code bigint DEFAULT NULL ,
  366. user_id int DEFAULT NULL ,
  367. task_type varchar(50) DEFAULT NULL ,
  368. task_params text ,
  369. flag int DEFAULT NULL ,
  370. task_priority int DEFAULT NULL ,
  371. worker_group varchar(255) DEFAULT NULL ,
  372. environment_code bigint DEFAULT '-1',
  373. fail_retry_times int DEFAULT NULL ,
  374. fail_retry_interval int DEFAULT NULL ,
  375. timeout_flag int DEFAULT NULL ,
  376. timeout_notify_strategy int DEFAULT NULL ,
  377. timeout int DEFAULT '0' ,
  378. delay_time int DEFAULT '0' ,
  379. resource_ids text ,
  380. operator int DEFAULT NULL ,
  381. task_group_id int DEFAULT NULL,
  382. task_group_priority int DEFAULT '0',
  383. operate_time timestamp DEFAULT NULL ,
  384. create_time timestamp DEFAULT NULL ,
  385. update_time timestamp DEFAULT NULL ,
  386. PRIMARY KEY (id)
  387. ) ;
  388. create index idx_task_definition_log_code_version on t_ds_task_definition_log (code,version);
  389. create index idx_task_definition_log_project_code on t_ds_task_definition_log (project_code);
  390. --
  391. -- Table structure for table t_ds_process_task_relation
  392. --
  393. DROP TABLE IF EXISTS t_ds_process_task_relation;
  394. CREATE TABLE t_ds_process_task_relation (
  395. id int NOT NULL ,
  396. name varchar(255) DEFAULT NULL ,
  397. project_code bigint DEFAULT NULL ,
  398. process_definition_code bigint DEFAULT NULL ,
  399. process_definition_version int DEFAULT NULL ,
  400. pre_task_code bigint DEFAULT NULL ,
  401. pre_task_version int DEFAULT '0' ,
  402. post_task_code bigint DEFAULT NULL ,
  403. post_task_version int DEFAULT '0' ,
  404. condition_type int DEFAULT NULL ,
  405. condition_params text ,
  406. create_time timestamp DEFAULT NULL ,
  407. update_time timestamp DEFAULT NULL ,
  408. PRIMARY KEY (id)
  409. ) ;
  410. create index process_task_relation_idx_project_code_process_definition_code on t_ds_process_task_relation (project_code,process_definition_code);
  411. --
  412. -- Table structure for table t_ds_process_task_relation_log
  413. --
  414. DROP TABLE IF EXISTS t_ds_process_task_relation_log;
  415. CREATE TABLE t_ds_process_task_relation_log (
  416. id int NOT NULL ,
  417. name varchar(255) DEFAULT NULL ,
  418. project_code bigint DEFAULT NULL ,
  419. process_definition_code bigint DEFAULT NULL ,
  420. process_definition_version int DEFAULT NULL ,
  421. pre_task_code bigint DEFAULT NULL ,
  422. pre_task_version int DEFAULT '0' ,
  423. post_task_code bigint DEFAULT NULL ,
  424. post_task_version int DEFAULT '0' ,
  425. condition_type int DEFAULT NULL ,
  426. condition_params text ,
  427. operator int DEFAULT NULL ,
  428. operate_time timestamp DEFAULT NULL ,
  429. create_time timestamp DEFAULT NULL ,
  430. update_time timestamp DEFAULT NULL ,
  431. PRIMARY KEY (id)
  432. ) ;
  433. create index process_task_relation_log_idx_project_code_process_definition_code on t_ds_process_task_relation_log (project_code,process_definition_code);
  434. --
  435. -- Table structure for table t_ds_process_instance
  436. --
  437. DROP TABLE IF EXISTS t_ds_process_instance;
  438. CREATE TABLE t_ds_process_instance (
  439. id int NOT NULL ,
  440. name varchar(255) DEFAULT NULL ,
  441. process_definition_code bigint DEFAULT NULL ,
  442. process_definition_version int DEFAULT NULL ,
  443. state int DEFAULT NULL ,
  444. recovery int DEFAULT NULL ,
  445. start_time timestamp DEFAULT NULL ,
  446. end_time timestamp DEFAULT NULL ,
  447. run_times int DEFAULT NULL ,
  448. host varchar(135) DEFAULT NULL ,
  449. command_type int DEFAULT NULL ,
  450. command_param text ,
  451. task_depend_type int DEFAULT NULL ,
  452. max_try_times int DEFAULT '0' ,
  453. failure_strategy int DEFAULT '0' ,
  454. warning_type int DEFAULT '0' ,
  455. warning_group_id int DEFAULT NULL ,
  456. schedule_time timestamp DEFAULT NULL ,
  457. command_start_time timestamp DEFAULT NULL ,
  458. global_params text ,
  459. process_instance_json text ,
  460. flag int DEFAULT '1' ,
  461. update_time timestamp NULL ,
  462. is_sub_process int DEFAULT '0' ,
  463. executor_id int NOT NULL ,
  464. history_cmd text ,
  465. dependence_schedule_times text ,
  466. process_instance_priority int DEFAULT NULL ,
  467. worker_group varchar(64) ,
  468. environment_code bigint DEFAULT '-1',
  469. timeout int DEFAULT '0' ,
  470. tenant_id int NOT NULL DEFAULT '-1' ,
  471. var_pool text ,
  472. dry_run int DEFAULT '0' ,
  473. next_process_instance_id int DEFAULT '0',
  474. restart_time timestamp DEFAULT NULL ,
  475. PRIMARY KEY (id)
  476. ) ;
  477. create index process_instance_index on t_ds_process_instance (process_definition_code,id);
  478. create index start_time_index on t_ds_process_instance (start_time,end_time);
  479. --
  480. -- Table structure for table t_ds_project
  481. --
  482. DROP TABLE IF EXISTS t_ds_project;
  483. CREATE TABLE t_ds_project (
  484. id int NOT NULL ,
  485. name varchar(100) DEFAULT NULL ,
  486. code bigint NOT NULL,
  487. description varchar(200) DEFAULT NULL ,
  488. user_id int DEFAULT NULL ,
  489. flag int DEFAULT '1' ,
  490. create_time timestamp DEFAULT CURRENT_TIMESTAMP ,
  491. update_time timestamp DEFAULT CURRENT_TIMESTAMP ,
  492. PRIMARY KEY (id)
  493. ) ;
  494. create index user_id_index on t_ds_project (user_id);
  495. --
  496. -- Table structure for table t_ds_queue
  497. --
  498. DROP TABLE IF EXISTS t_ds_queue;
  499. CREATE TABLE t_ds_queue (
  500. id int NOT NULL ,
  501. queue_name varchar(64) DEFAULT NULL ,
  502. queue varchar(64) DEFAULT NULL ,
  503. create_time timestamp DEFAULT NULL ,
  504. update_time timestamp DEFAULT NULL ,
  505. PRIMARY KEY (id)
  506. );
  507. --
  508. -- Table structure for table t_ds_relation_datasource_user
  509. --
  510. DROP TABLE IF EXISTS t_ds_relation_datasource_user;
  511. CREATE TABLE t_ds_relation_datasource_user (
  512. id int NOT NULL ,
  513. user_id int NOT NULL ,
  514. datasource_id int DEFAULT NULL ,
  515. perm int DEFAULT '1' ,
  516. create_time timestamp DEFAULT NULL ,
  517. update_time timestamp DEFAULT NULL ,
  518. PRIMARY KEY (id)
  519. ) ;
  520. ;
  521. --
  522. -- Table structure for table t_ds_relation_process_instance
  523. --
  524. DROP TABLE IF EXISTS t_ds_relation_process_instance;
  525. CREATE TABLE t_ds_relation_process_instance (
  526. id int NOT NULL ,
  527. parent_process_instance_id int DEFAULT NULL ,
  528. parent_task_instance_id int DEFAULT NULL ,
  529. process_instance_id int DEFAULT NULL ,
  530. PRIMARY KEY (id)
  531. ) ;
  532. --
  533. -- Table structure for table t_ds_relation_project_user
  534. --
  535. DROP TABLE IF EXISTS t_ds_relation_project_user;
  536. CREATE TABLE t_ds_relation_project_user (
  537. id int NOT NULL ,
  538. user_id int NOT NULL ,
  539. project_id int DEFAULT NULL ,
  540. perm int DEFAULT '1' ,
  541. create_time timestamp DEFAULT NULL ,
  542. update_time timestamp DEFAULT NULL ,
  543. PRIMARY KEY (id)
  544. ) ;
  545. create index relation_project_user_id_index on t_ds_relation_project_user (user_id);
  546. --
  547. -- Table structure for table t_ds_relation_resources_user
  548. --
  549. DROP TABLE IF EXISTS t_ds_relation_resources_user;
  550. CREATE TABLE t_ds_relation_resources_user (
  551. id int NOT NULL ,
  552. user_id int NOT NULL ,
  553. resources_id int DEFAULT NULL ,
  554. perm int DEFAULT '1' ,
  555. create_time timestamp DEFAULT NULL ,
  556. update_time timestamp DEFAULT NULL ,
  557. PRIMARY KEY (id)
  558. ) ;
  559. --
  560. -- Table structure for table t_ds_relation_udfs_user
  561. --
  562. DROP TABLE IF EXISTS t_ds_relation_udfs_user;
  563. CREATE TABLE t_ds_relation_udfs_user (
  564. id int NOT NULL ,
  565. user_id int NOT NULL ,
  566. udf_id int DEFAULT NULL ,
  567. perm int DEFAULT '1' ,
  568. create_time timestamp DEFAULT NULL ,
  569. update_time timestamp DEFAULT NULL ,
  570. PRIMARY KEY (id)
  571. ) ;
  572. ;
  573. --
  574. -- Table structure for table t_ds_resources
  575. --
  576. DROP TABLE IF EXISTS t_ds_resources;
  577. CREATE TABLE t_ds_resources (
  578. id int NOT NULL ,
  579. alias varchar(64) DEFAULT NULL ,
  580. file_name varchar(64) DEFAULT NULL ,
  581. description varchar(255) DEFAULT NULL ,
  582. user_id int DEFAULT NULL ,
  583. type int DEFAULT NULL ,
  584. size bigint DEFAULT NULL ,
  585. create_time timestamp DEFAULT NULL ,
  586. update_time timestamp DEFAULT NULL ,
  587. pid int,
  588. full_name varchar(64),
  589. is_directory boolean DEFAULT FALSE,
  590. PRIMARY KEY (id),
  591. CONSTRAINT t_ds_resources_un UNIQUE (full_name, type)
  592. ) ;
  593. --
  594. -- Table structure for table t_ds_schedules
  595. --
  596. DROP TABLE IF EXISTS t_ds_schedules;
  597. CREATE TABLE t_ds_schedules (
  598. id int NOT NULL ,
  599. process_definition_code bigint NOT NULL ,
  600. start_time timestamp NOT NULL ,
  601. end_time timestamp NOT NULL ,
  602. timezone_id varchar(40) default NULL ,
  603. crontab varchar(255) NOT NULL ,
  604. failure_strategy int NOT NULL ,
  605. user_id int NOT NULL ,
  606. release_state int NOT NULL ,
  607. warning_type int NOT NULL ,
  608. warning_group_id int DEFAULT NULL ,
  609. process_instance_priority int DEFAULT NULL ,
  610. worker_group varchar(64),
  611. environment_code bigint DEFAULT '-1',
  612. create_time timestamp NOT NULL ,
  613. update_time timestamp NOT NULL ,
  614. PRIMARY KEY (id)
  615. );
  616. --
  617. -- Table structure for table t_ds_session
  618. --
  619. DROP TABLE IF EXISTS t_ds_session;
  620. CREATE TABLE t_ds_session (
  621. id varchar(64) NOT NULL ,
  622. user_id int DEFAULT NULL ,
  623. ip varchar(45) DEFAULT NULL ,
  624. last_login_time timestamp DEFAULT NULL ,
  625. PRIMARY KEY (id)
  626. );
  627. --
  628. -- Table structure for table t_ds_task_instance
  629. --
  630. DROP TABLE IF EXISTS t_ds_task_instance;
  631. CREATE TABLE t_ds_task_instance (
  632. id int NOT NULL ,
  633. name varchar(255) DEFAULT NULL ,
  634. task_type varchar(50) DEFAULT NULL ,
  635. task_code bigint NOT NULL,
  636. task_definition_version int DEFAULT NULL ,
  637. process_instance_id int DEFAULT NULL ,
  638. state int DEFAULT NULL ,
  639. submit_time timestamp DEFAULT NULL ,
  640. start_time timestamp DEFAULT NULL ,
  641. end_time timestamp DEFAULT NULL ,
  642. host varchar(135) DEFAULT NULL ,
  643. execute_path varchar(200) DEFAULT NULL ,
  644. log_path varchar(200) DEFAULT NULL ,
  645. alert_flag int DEFAULT NULL ,
  646. retry_times int DEFAULT '0' ,
  647. pid int DEFAULT NULL ,
  648. app_link text ,
  649. task_params text ,
  650. flag int DEFAULT '1' ,
  651. retry_interval int DEFAULT NULL ,
  652. max_retry_times int DEFAULT NULL ,
  653. task_instance_priority int DEFAULT NULL ,
  654. worker_group varchar(64),
  655. environment_code bigint DEFAULT '-1',
  656. environment_config text,
  657. executor_id int DEFAULT NULL ,
  658. first_submit_time timestamp DEFAULT NULL ,
  659. delay_time int DEFAULT '0' ,
  660. task_group_id int DEFAULT NULL,
  661. var_pool text ,
  662. dry_run int DEFAULT '0' ,
  663. PRIMARY KEY (id),
  664. CONSTRAINT foreign_key_instance_id FOREIGN KEY(process_instance_id) REFERENCES t_ds_process_instance(id) ON DELETE CASCADE
  665. ) ;
  666. create index idx_task_instance_code_version on t_ds_task_instance (task_code, task_definition_version);
  667. --
  668. -- Table structure for table t_ds_tenant
  669. --
  670. DROP TABLE IF EXISTS t_ds_tenant;
  671. CREATE TABLE t_ds_tenant (
  672. id int NOT NULL ,
  673. tenant_code varchar(64) DEFAULT NULL ,
  674. description varchar(255) DEFAULT NULL ,
  675. queue_id int DEFAULT NULL ,
  676. create_time timestamp DEFAULT NULL ,
  677. update_time timestamp DEFAULT NULL ,
  678. PRIMARY KEY (id)
  679. ) ;
  680. --
  681. -- Table structure for table t_ds_udfs
  682. --
  683. DROP TABLE IF EXISTS t_ds_udfs;
  684. CREATE TABLE t_ds_udfs (
  685. id int NOT NULL ,
  686. user_id int NOT NULL ,
  687. func_name varchar(100) NOT NULL ,
  688. class_name varchar(255) NOT NULL ,
  689. type int NOT NULL ,
  690. arg_types varchar(255) DEFAULT NULL ,
  691. database varchar(255) DEFAULT NULL ,
  692. description varchar(255) DEFAULT NULL ,
  693. resource_id int NOT NULL ,
  694. resource_name varchar(255) NOT NULL ,
  695. create_time timestamp NOT NULL ,
  696. update_time timestamp NOT NULL ,
  697. PRIMARY KEY (id)
  698. ) ;
  699. --
  700. -- Table structure for table t_ds_user
  701. --
  702. DROP TABLE IF EXISTS t_ds_user;
  703. CREATE TABLE t_ds_user (
  704. id int NOT NULL ,
  705. user_name varchar(64) DEFAULT NULL ,
  706. user_password varchar(64) DEFAULT NULL ,
  707. user_type int DEFAULT NULL ,
  708. email varchar(64) DEFAULT NULL ,
  709. phone varchar(11) DEFAULT NULL ,
  710. tenant_id int DEFAULT NULL ,
  711. create_time timestamp DEFAULT NULL ,
  712. update_time timestamp DEFAULT NULL ,
  713. queue varchar(64) DEFAULT NULL ,
  714. state int DEFAULT 1 ,
  715. PRIMARY KEY (id)
  716. );
  717. comment on column t_ds_user.state is 'state 0:disable 1:enable';
  718. --
  719. -- Table structure for table t_ds_version
  720. --
  721. DROP TABLE IF EXISTS t_ds_version;
  722. CREATE TABLE t_ds_version (
  723. id int NOT NULL ,
  724. version varchar(200) NOT NULL,
  725. PRIMARY KEY (id)
  726. ) ;
  727. create index version_index on t_ds_version(version);
  728. --
  729. -- Table structure for table t_ds_worker_group
  730. --
  731. DROP TABLE IF EXISTS t_ds_worker_group;
  732. CREATE TABLE t_ds_worker_group (
  733. id bigint NOT NULL ,
  734. name varchar(255) NOT NULL ,
  735. addr_list text DEFAULT NULL ,
  736. create_time timestamp DEFAULT NULL ,
  737. update_time timestamp DEFAULT NULL ,
  738. PRIMARY KEY (id) ,
  739. CONSTRAINT name_unique UNIQUE (name)
  740. ) ;
  741. --
  742. -- Table structure for table t_ds_worker_server
  743. --
  744. DROP TABLE IF EXISTS t_ds_worker_server;
  745. CREATE TABLE t_ds_worker_server (
  746. id int NOT NULL ,
  747. host varchar(45) DEFAULT NULL ,
  748. port int DEFAULT NULL ,
  749. zk_directory varchar(64) DEFAULT NULL ,
  750. res_info varchar(255) DEFAULT NULL ,
  751. create_time timestamp DEFAULT NULL ,
  752. last_heartbeat_time timestamp DEFAULT NULL ,
  753. PRIMARY KEY (id)
  754. ) ;
  755. DROP SEQUENCE IF EXISTS t_ds_access_token_id_sequence;
  756. CREATE SEQUENCE t_ds_access_token_id_sequence;
  757. ALTER TABLE t_ds_access_token ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_access_token_id_sequence');
  758. DROP SEQUENCE IF EXISTS t_ds_alert_id_sequence;
  759. CREATE SEQUENCE t_ds_alert_id_sequence;
  760. ALTER TABLE t_ds_alert ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_alert_id_sequence');
  761. DROP SEQUENCE IF EXISTS t_ds_alertgroup_id_sequence;
  762. CREATE SEQUENCE t_ds_alertgroup_id_sequence;
  763. ALTER TABLE t_ds_alertgroup ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_alertgroup_id_sequence');
  764. DROP SEQUENCE IF EXISTS t_ds_command_id_sequence;
  765. CREATE SEQUENCE t_ds_command_id_sequence;
  766. ALTER TABLE t_ds_command ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_command_id_sequence');
  767. DROP SEQUENCE IF EXISTS t_ds_datasource_id_sequence;
  768. CREATE SEQUENCE t_ds_datasource_id_sequence;
  769. ALTER TABLE t_ds_datasource ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_datasource_id_sequence');
  770. DROP SEQUENCE IF EXISTS t_ds_process_definition_id_sequence;
  771. CREATE SEQUENCE t_ds_process_definition_id_sequence;
  772. ALTER TABLE t_ds_process_definition ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_process_definition_id_sequence');
  773. DROP SEQUENCE IF EXISTS t_ds_process_definition_log_id_sequence;
  774. CREATE SEQUENCE t_ds_process_definition_log_id_sequence;
  775. ALTER TABLE t_ds_process_definition_log ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_process_definition_log_id_sequence');
  776. DROP SEQUENCE IF EXISTS t_ds_task_definition_id_sequence;
  777. CREATE SEQUENCE t_ds_task_definition_id_sequence;
  778. ALTER TABLE t_ds_task_definition ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_task_definition_id_sequence');
  779. DROP SEQUENCE IF EXISTS t_ds_task_definition_log_id_sequence;
  780. CREATE SEQUENCE t_ds_task_definition_log_id_sequence;
  781. ALTER TABLE t_ds_task_definition_log ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_task_definition_log_id_sequence');
  782. DROP SEQUENCE IF EXISTS t_ds_process_task_relation_id_sequence;
  783. CREATE SEQUENCE t_ds_process_task_relation_id_sequence;
  784. ALTER TABLE t_ds_process_task_relation ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_process_task_relation_id_sequence');
  785. DROP SEQUENCE IF EXISTS t_ds_process_task_relation_log_id_sequence;
  786. CREATE SEQUENCE t_ds_process_task_relation_log_id_sequence;
  787. ALTER TABLE t_ds_process_task_relation_log ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_process_task_relation_log_id_sequence');
  788. DROP SEQUENCE IF EXISTS t_ds_process_instance_id_sequence;
  789. CREATE SEQUENCE t_ds_process_instance_id_sequence;
  790. ALTER TABLE t_ds_process_instance ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_process_instance_id_sequence');
  791. DROP SEQUENCE IF EXISTS t_ds_project_id_sequence;
  792. CREATE SEQUENCE t_ds_project_id_sequence;
  793. ALTER TABLE t_ds_project ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_project_id_sequence');
  794. DROP SEQUENCE IF EXISTS t_ds_queue_id_sequence;
  795. CREATE SEQUENCE t_ds_queue_id_sequence;
  796. ALTER TABLE t_ds_queue ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_queue_id_sequence');
  797. DROP SEQUENCE IF EXISTS t_ds_relation_datasource_user_id_sequence;
  798. CREATE SEQUENCE t_ds_relation_datasource_user_id_sequence;
  799. ALTER TABLE t_ds_relation_datasource_user ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_relation_datasource_user_id_sequence');
  800. DROP SEQUENCE IF EXISTS t_ds_relation_process_instance_id_sequence;
  801. CREATE SEQUENCE t_ds_relation_process_instance_id_sequence;
  802. ALTER TABLE t_ds_relation_process_instance ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_relation_process_instance_id_sequence');
  803. DROP SEQUENCE IF EXISTS t_ds_relation_project_user_id_sequence;
  804. CREATE SEQUENCE t_ds_relation_project_user_id_sequence;
  805. ALTER TABLE t_ds_relation_project_user ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_relation_project_user_id_sequence');
  806. DROP SEQUENCE IF EXISTS t_ds_relation_resources_user_id_sequence;
  807. CREATE SEQUENCE t_ds_relation_resources_user_id_sequence;
  808. ALTER TABLE t_ds_relation_resources_user ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_relation_resources_user_id_sequence');
  809. DROP SEQUENCE IF EXISTS t_ds_relation_udfs_user_id_sequence;
  810. CREATE SEQUENCE t_ds_relation_udfs_user_id_sequence;
  811. ALTER TABLE t_ds_relation_udfs_user ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_relation_udfs_user_id_sequence');
  812. DROP SEQUENCE IF EXISTS t_ds_resources_id_sequence;
  813. CREATE SEQUENCE t_ds_resources_id_sequence;
  814. ALTER TABLE t_ds_resources ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_resources_id_sequence');
  815. DROP SEQUENCE IF EXISTS t_ds_schedules_id_sequence;
  816. CREATE SEQUENCE t_ds_schedules_id_sequence;
  817. ALTER TABLE t_ds_schedules ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_schedules_id_sequence');
  818. DROP SEQUENCE IF EXISTS t_ds_task_instance_id_sequence;
  819. CREATE SEQUENCE t_ds_task_instance_id_sequence;
  820. ALTER TABLE t_ds_task_instance ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_task_instance_id_sequence');
  821. DROP SEQUENCE IF EXISTS t_ds_tenant_id_sequence;
  822. CREATE SEQUENCE t_ds_tenant_id_sequence;
  823. ALTER TABLE t_ds_tenant ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_tenant_id_sequence');
  824. DROP SEQUENCE IF EXISTS t_ds_udfs_id_sequence;
  825. CREATE SEQUENCE t_ds_udfs_id_sequence;
  826. ALTER TABLE t_ds_udfs ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_udfs_id_sequence');
  827. DROP SEQUENCE IF EXISTS t_ds_user_id_sequence;
  828. CREATE SEQUENCE t_ds_user_id_sequence;
  829. ALTER TABLE t_ds_user ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_user_id_sequence');
  830. DROP SEQUENCE IF EXISTS t_ds_version_id_sequence;
  831. CREATE SEQUENCE t_ds_version_id_sequence;
  832. ALTER TABLE t_ds_version ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_version_id_sequence');
  833. DROP SEQUENCE IF EXISTS t_ds_worker_group_id_sequence;
  834. CREATE SEQUENCE t_ds_worker_group_id_sequence;
  835. ALTER TABLE t_ds_worker_group ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_worker_group_id_sequence');
  836. DROP SEQUENCE IF EXISTS t_ds_worker_server_id_sequence;
  837. CREATE SEQUENCE t_ds_worker_server_id_sequence;
  838. ALTER TABLE t_ds_worker_server ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_worker_server_id_sequence');
  839. -- Records of t_ds_user?user : admin , password : dolphinscheduler123
  840. INSERT INTO t_ds_user(user_name, user_password, user_type, email, phone, tenant_id, state, create_time, update_time)
  841. VALUES ('admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', '', '0', 1, '2018-03-27 15:48:50', '2018-10-24 17:40:22');
  842. -- Records of t_ds_alertgroup, default admin warning group
  843. INSERT INTO t_ds_alertgroup(alert_instance_ids, create_user_id, group_name, description, create_time, update_time)
  844. VALUES ('1,2', 1, 'default admin warning group', 'default admin warning group', '2018-11-29 10:20:39', '2018-11-29 10:20:39');
  845. -- Records of t_ds_queue,default queue name : default
  846. INSERT INTO t_ds_queue(queue_name, queue, create_time, update_time)
  847. VALUES ('default', 'default', '2018-11-29 10:22:33', '2018-11-29 10:22:33');
  848. -- Records of t_ds_queue,default queue name : default
  849. INSERT INTO t_ds_version(version) VALUES ('1.4.0');
  850. --
  851. -- Table structure for table t_ds_plugin_define
  852. --
  853. DROP TABLE IF EXISTS t_ds_plugin_define;
  854. CREATE TABLE t_ds_plugin_define (
  855. id serial NOT NULL,
  856. plugin_name varchar(100) NOT NULL,
  857. plugin_type varchar(100) NOT NULL,
  858. plugin_params text NULL,
  859. create_time timestamp NULL,
  860. update_time timestamp NULL,
  861. CONSTRAINT t_ds_plugin_define_pk PRIMARY KEY (id),
  862. CONSTRAINT t_ds_plugin_define_un UNIQUE (plugin_name, plugin_type)
  863. );
  864. --
  865. -- Table structure for table t_ds_alert_plugin_instance
  866. --
  867. DROP TABLE IF EXISTS t_ds_alert_plugin_instance;
  868. CREATE TABLE t_ds_alert_plugin_instance (
  869. id serial NOT NULL,
  870. plugin_define_id int4 NOT NULL,
  871. plugin_instance_params text NULL,
  872. create_time timestamp NULL,
  873. update_time timestamp NULL,
  874. instance_name varchar(200) NULL,
  875. CONSTRAINT t_ds_alert_plugin_instance_pk PRIMARY KEY (id)
  876. );
  877. --
  878. -- Table structure for table t_ds_dq_comparison_type
  879. --
  880. DROP TABLE IF EXISTS t_ds_dq_comparison_type;
  881. CREATE TABLE t_ds_dq_comparison_type (
  882. id serial NOT NULL,
  883. "type" varchar NOT NULL,
  884. execute_sql varchar NULL,
  885. output_table varchar NULL,
  886. "name" varchar NULL,
  887. create_time timestamp NULL,
  888. update_time timestamp NULL,
  889. is_inner_source bool NULL,
  890. CONSTRAINT t_ds_dq_comparison_type_pk PRIMARY KEY (id)
  891. );
  892. INSERT INTO t_ds_dq_comparison_type
  893. (id, "type", execute_sql, output_table, "name", create_time, update_time, is_inner_source)
  894. VALUES(1, 'FixValue', NULL, NULL, NULL, '2021-06-30 00:00:00.000', '2021-06-30 00:00:00.000', false);
  895. INSERT INTO t_ds_dq_comparison_type
  896. (id, "type", execute_sql, output_table, "name", create_time, update_time, is_inner_source)
  897. VALUES(2, 'DailyAvg', 'select round(avg(statistics_value),2) as day_avg from t_ds_dq_task_statistics_value where data_time >=date_trunc(''DAY'', ${data_time}) and data_time < date_add(date_trunc(''day'', ${data_time}),1) and unique_code = ${unique_code} and statistics_name = ''${statistics_name}''', 'day_range', 'day_range.day_avg', '2021-06-30 00:00:00.000', '2021-06-30 00:00:00.000', true);
  898. INSERT INTO t_ds_dq_comparison_type
  899. (id, "type", execute_sql, output_table, "name", create_time, update_time, is_inner_source)
  900. VALUES(3, 'WeeklyAvg', 'select round(avg(statistics_value),2) as week_avg from t_ds_dq_task_statistics_value where data_time >= date_trunc(''WEEK'', ${data_time}) and data_time <date_trunc(''day'', ${data_time}) and unique_code = ${unique_code} and statistics_name = ''${statistics_name}''', 'week_range', 'week_range.week_avg', '2021-06-30 00:00:00.000', '2021-06-30 00:00:00.000', true);
  901. INSERT INTO t_ds_dq_comparison_type
  902. (id, "type", execute_sql, output_table, "name", create_time, update_time, is_inner_source)
  903. VALUES(4, 'MonthlyAvg', 'select round(avg(statistics_value),2) as month_avg from t_ds_dq_task_statistics_value where data_time >= date_trunc(''MONTH'', ${data_time}) and data_time <date_trunc(''day'', ${data_time}) and unique_code = ${unique_code} and statistics_name = ''${statistics_name}''', 'month_range', 'month_range.month_avg', '2021-06-30 00:00:00.000', '2021-06-30 00:00:00.000', true);
  904. INSERT INTO t_ds_dq_comparison_type
  905. (id, "type", execute_sql, output_table, "name", create_time, update_time, is_inner_source)
  906. VALUES(5, 'Last7DayAvg', 'select round(avg(statistics_value),2) as last_7_avg from t_ds_dq_task_statistics_value where data_time >= date_add(date_trunc(''day'', ${data_time}),-7) and data_time <date_trunc(''day'', ${data_time}) and unique_code = ${unique_code} and statistics_name = ''${statistics_name}''', 'last_seven_days', 'last_seven_days.last_7_avg', '2021-06-30 00:00:00.000', '2021-06-30 00:00:00.000', true);
  907. INSERT INTO t_ds_dq_comparison_type
  908. (id, "type", execute_sql, output_table, "name", create_time, update_time, is_inner_source)
  909. VALUES(6, 'Last30DayAvg', 'select round(avg(statistics_value),2) as last_30_avg from t_ds_dq_task_statistics_value where data_time >= date_add(date_trunc(''day'', ${data_time}),-30) and data_time < date_trunc(''day'', ${data_time}) and unique_code = ${unique_code} and statistics_name = ''${statistics_name}''', 'last_thirty_days', 'last_thirty_days.last_30_avg', '2021-06-30 00:00:00.000', '2021-06-30 00:00:00.000', true);
  910. INSERT INTO t_ds_dq_comparison_type
  911. (id, "type", execute_sql, output_table, "name", create_time, update_time, is_inner_source)
  912. VALUES(7, 'SrcTableTotalRows', 'SELECT COUNT(*) AS total FROM ${src_table} WHERE (${src_filter})', 'total_count', 'total_count.total', '2021-06-30 00:00:00.000', '2021-06-30 00:00:00.000', false);
  913. INSERT INTO t_ds_dq_comparison_type
  914. (id, "type", execute_sql, output_table, "name", create_time, update_time, is_inner_source)
  915. VALUES(8, 'TargetTableTotalRows', 'SELECT COUNT(*) AS total FROM ${target_table} WHERE (${target_filter})', 'total_count', 'total_count.total', '2021-06-30 00:00:00.000', '2021-06-30 00:00:00.000', false);
  916. --
  917. -- Table structure for table t_ds_dq_execute_result
  918. --
  919. DROP TABLE IF EXISTS t_ds_dq_execute_result;
  920. CREATE TABLE t_ds_dq_execute_result (
  921. id serial NOT NULL,
  922. process_definition_id int4 NULL,
  923. process_instance_id int4 NULL,
  924. task_instance_id int4 NULL,
  925. rule_type int4 NULL,
  926. rule_name varchar(255) DEFAULT NULL,
  927. statistics_value float8 NULL,
  928. comparison_value float8 NULL,
  929. check_type int4 NULL,
  930. threshold float8 NULL,
  931. "operator" int4 NULL,
  932. failure_strategy int4 NULL,
  933. state int4 NULL,
  934. user_id int4 NULL,
  935. create_time timestamp NULL,
  936. update_time timestamp NULL,
  937. comparison_type int4 NULL,
  938. error_output_path text NULL,
  939. CONSTRAINT t_ds_dq_execute_result_pk PRIMARY KEY (id)
  940. );
  941. --
  942. -- Table structure for table t_ds_dq_rule
  943. --
  944. DROP TABLE IF EXISTS t_ds_dq_rule;
  945. CREATE TABLE t_ds_dq_rule (
  946. id serial NOT NULL,
  947. "name" varchar(100) DEFAULT NULL,
  948. "type" int4 NULL,
  949. user_id int4 NULL,
  950. create_time timestamp NULL,
  951. update_time timestamp NULL,
  952. CONSTRAINT t_ds_dq_rule_pk PRIMARY KEY (id)
  953. );
  954. INSERT INTO t_ds_dq_rule
  955. (id, "name", "type", user_id, create_time, update_time)
  956. VALUES(1, '$t(null_check)', 0, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  957. INSERT INTO t_ds_dq_rule
  958. (id, "name", "type", user_id, create_time, update_time)
  959. VALUES(2, '$t(custom_sql)', 1, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  960. INSERT INTO t_ds_dq_rule
  961. (id, "name", "type", user_id, create_time, update_time)
  962. VALUES(3, '$t(multi_table_accuracy)', 2, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  963. INSERT INTO t_ds_dq_rule
  964. (id, "name", "type", user_id, create_time, update_time)
  965. VALUES(4, '$t(multi_table_value_comparison)', 3, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  966. INSERT INTO t_ds_dq_rule
  967. (id, "name", "type", user_id, create_time, update_time)
  968. VALUES(5, '$t(field_length_check)', 0, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  969. INSERT INTO t_ds_dq_rule
  970. (id, "name", "type", user_id, create_time, update_time)
  971. VALUES(6, '$t(uniqueness_check)', 0, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  972. INSERT INTO t_ds_dq_rule
  973. (id, "name", "type", user_id, create_time, update_time)
  974. VALUES(7, '$t(regexp_check)', 0, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  975. INSERT INTO t_ds_dq_rule
  976. (id, "name", "type", user_id, create_time, update_time)
  977. VALUES(8, '$t(timeliness_check)', 0, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  978. INSERT INTO t_ds_dq_rule
  979. (id, "name", "type", user_id, create_time, update_time)
  980. VALUES(9, '$t(enumeration_check)', 0, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  981. INSERT INTO t_ds_dq_rule
  982. (id, "name", "type", user_id, create_time, update_time)
  983. VALUES(10, '$t(table_count_check)', 0, 1, '2020-01-12 00:00:00.000', '2020-01-12 00:00:00.000');
  984. --
  985. -- Table structure for table t_ds_dq_rule_execute_sql
  986. --
  987. DROP TABLE IF EXISTS t_ds_dq_rule_execute_sql;
  988. CREATE TABLE t_ds_dq_rule_execute_sql (
  989. id serial NOT NULL,
  990. "index" int4 NULL,
  991. "sql" text NULL,
  992. table_alias varchar(255) DEFAULT NULL,
  993. "type" int4 NULL,
  994. create_time timestamp NULL,
  995. update_time timestamp NULL,
  996. is_error_output_sql bool NULL,
  997. CONSTRAINT t_ds_dq_rule_execute_sql_pk PRIMARY KEY (id)
  998. );
  999. INSERT INTO t_ds_dq_rule_execute_sql
  1000. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1001. VALUES(1, 1, 'SELECT COUNT(*) AS nulls FROM null_items', 'null_count', 1, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1002. INSERT INTO t_ds_dq_rule_execute_sql
  1003. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1004. VALUES(2, 1, 'SELECT COUNT(*) AS total FROM ${src_table} WHERE (${src_filter})', 'total_count', 2, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1005. INSERT INTO t_ds_dq_rule_execute_sql
  1006. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1007. VALUES(3, 1, 'SELECT COUNT(*) AS miss from miss_items', 'miss_count', 1, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1008. INSERT INTO t_ds_dq_rule_execute_sql
  1009. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1010. VALUES(4, 1, 'SELECT COUNT(*) AS valids FROM invalid_length_items', 'invalid_length_count', 1, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1011. INSERT INTO t_ds_dq_rule_execute_sql
  1012. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1013. VALUES(5, 1, 'SELECT COUNT(*) AS total FROM ${target_table} WHERE (${target_filter})', 'total_count', 2, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1014. INSERT INTO t_ds_dq_rule_execute_sql
  1015. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1016. VALUES(6, 1, 'SELECT ${src_field} FROM ${src_table} group by ${src_field} having count(*) > 1', 'duplicate_items', 0, true, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1017. INSERT INTO t_ds_dq_rule_execute_sql
  1018. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1019. VALUES(7, 1, 'SELECT COUNT(*) AS duplicates FROM duplicate_items', 'duplicate_count', 1, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1020. INSERT INTO t_ds_dq_rule_execute_sql
  1021. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1022. VALUES(8, 1, 'SELECT ${src_table}.* FROM (SELECT * FROM ${src_table} WHERE (${src_filter})) ${src_table} LEFT JOIN (SELECT * FROM ${target_table} WHERE (${target_filter})) ${target_table} ON ${on_clause} WHERE ${where_clause}', 'miss_items', 0, true, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1023. INSERT INTO t_ds_dq_rule_execute_sql
  1024. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1025. VALUES(9, 1, 'SELECT * FROM ${src_table} WHERE (${src_field} not regexp ''${regexp_pattern}'') AND (${src_filter}) ', 'regexp_items', 0, true, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1026. INSERT INTO t_ds_dq_rule_execute_sql
  1027. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1028. VALUES(10, 1, 'SELECT COUNT(*) AS regexps FROM regexp_items', 'regexp_count', 1, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1029. INSERT INTO t_ds_dq_rule_execute_sql
  1030. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1031. VALUES(11, 1, 'SELECT * FROM ${src_table} WHERE (to_unix_timestamp(${src_field}, ''${datetime_format}'')-to_unix_timestamp(''${deadline}'', ''${datetime_format}'') <= 0) AND (to_unix_timestamp(${src_field}, ''${datetime_format}'')-to_unix_timestamp(''${begin_time}'', ''${datetime_format}'') >= 0) AND (${src_filter}) ', 'timeliness_items', 0, true, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1032. INSERT INTO t_ds_dq_rule_execute_sql
  1033. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1034. VALUES(12, 1, 'SELECT COUNT(*) AS timeliness FROM timeliness_items', 'timeliness_count', 1, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1035. INSERT INTO t_ds_dq_rule_execute_sql
  1036. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1037. VALUES(13, 1, 'SELECT * FROM ${src_table} where (${src_field} not in ( ${enum_list} ) or ${src_field} is null) AND (${src_filter}) ', 'enum_items', 0, true, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1038. INSERT INTO t_ds_dq_rule_execute_sql
  1039. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1040. VALUES(14, 1, 'SELECT COUNT(*) AS enums FROM enum_items', 'enum_count', 1, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1041. INSERT INTO t_ds_dq_rule_execute_sql
  1042. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1043. VALUES(15, 1, 'SELECT COUNT(*) AS total FROM ${src_table} WHERE (${src_filter})', 'table_count', 1, false, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1044. INSERT INTO t_ds_dq_rule_execute_sql
  1045. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1046. VALUES(16, 1, 'SELECT * FROM ${src_table} WHERE (${src_field} is null or ${src_field} = '''') AND (${src_filter})', 'null_items', 0, true, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1047. INSERT INTO t_ds_dq_rule_execute_sql
  1048. (id, "index", "sql", table_alias, "type", is_error_output_sql, create_time, update_time)
  1049. VALUES(17, 1, 'SELECT * FROM ${src_table} WHERE (length(${src_field}) ${logic_operator} ${field_length}) AND (${src_filter})', 'invalid_length_items', 0, true, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1050. --
  1051. -- Table structure for table t_ds_dq_rule_input_entry
  1052. --
  1053. DROP TABLE IF EXISTS t_ds_dq_rule_input_entry;
  1054. CREATE TABLE t_ds_dq_rule_input_entry (
  1055. id serial NOT NULL,
  1056. field varchar(255) DEFAULT NULL,
  1057. "type" varchar(255) DEFAULT NULL,
  1058. title varchar(255) DEFAULT NULL,
  1059. value varchar(255) DEFAULT NULL,
  1060. "options" text DEFAULT NULL,
  1061. placeholder varchar(255) DEFAULT NULL,
  1062. option_source_type int4 NULL,
  1063. value_type int4 NULL,
  1064. input_type int4 NULL,
  1065. is_show int2 NULL DEFAULT '1'::smallint,
  1066. can_edit int2 NULL DEFAULT '1'::smallint,
  1067. is_emit int2 NULL DEFAULT '0'::smallint,
  1068. is_validate int2 NULL DEFAULT '0'::smallint,
  1069. create_time timestamp NULL,
  1070. update_time timestamp NULL,
  1071. CONSTRAINT t_ds_dq_rule_input_entry_pk PRIMARY KEY (id)
  1072. );
  1073. INSERT INTO t_ds_dq_rule_input_entry
  1074. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1075. VALUES(1, 'src_connector_type', 'select', '$t(src_connector_type)', '', '[{"label":"HIVE","value":"HIVE"},{"label":"JDBC","value":"JDBC"}]', 'please select source connector type', 2, 2, 0, 1, 1, 1, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1076. INSERT INTO t_ds_dq_rule_input_entry
  1077. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1078. VALUES(2, 'src_datasource_id', 'select', '$t(src_datasource_id)', '', NULL, 'please select source datasource id', 1, 2, 0, 1, 1, 1, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1079. INSERT INTO t_ds_dq_rule_input_entry
  1080. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1081. VALUES(3, 'src_table', 'select', '$t(src_table)', NULL, NULL, 'Please enter source table name', 0, 0, 0, 1, 1, 1, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1082. INSERT INTO t_ds_dq_rule_input_entry
  1083. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1084. VALUES(4, 'src_filter', 'input', '$t(src_filter)', NULL, NULL, 'Please enter filter expression', 0, 3, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1085. INSERT INTO t_ds_dq_rule_input_entry
  1086. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1087. VALUES(5, 'src_field', 'select', '$t(src_field)', NULL, NULL, 'Please enter column, only single column is supported', 0, 0, 0, 1, 1, 0, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1088. INSERT INTO t_ds_dq_rule_input_entry
  1089. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1090. VALUES(6, 'statistics_name', 'input', '$t(statistics_name)', NULL, NULL, 'Please enter statistics name, the alias in statistics execute sql', 0, 0, 1, 0, 0, 0, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1091. INSERT INTO t_ds_dq_rule_input_entry
  1092. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1093. VALUES(7, 'check_type', 'select', '$t(check_type)', '0', '[{"label":"Expected - Actual","value":"0"},{"label":"Actual - Expected","value":"1"},{"label":"Actual / Expected","value":"2"},{"label":"(Expected - Actual) / Expected","value":"3"}]', 'please select check type', 0, 0, 3, 1, 1, 1, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1094. INSERT INTO t_ds_dq_rule_input_entry
  1095. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1096. VALUES(8, 'operator', 'select', '$t(operator)', '0', '[{"label":"=","value":"0"},{"label":"<","value":"1"},{"label":"<=","value":"2"},{"label":">","value":"3"},{"label":">=","value":"4"},{"label":"!=","value":"5"}]', 'please select operator', 0, 0, 3, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1097. INSERT INTO t_ds_dq_rule_input_entry
  1098. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1099. VALUES(9, 'threshold', 'input', '$t(threshold)', NULL, NULL, 'Please enter threshold, number is needed', 0, 2, 3, 1, 1, 0, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1100. INSERT INTO t_ds_dq_rule_input_entry
  1101. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1102. VALUES(10, 'failure_strategy', 'select', '$t(failure_strategy)', '0', '[{"label":"Alert","value":"0"},{"label":"Block","value":"1"}]', 'please select failure strategy', 0, 0, 3, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1103. INSERT INTO t_ds_dq_rule_input_entry
  1104. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1105. VALUES(11, 'target_connector_type', 'select', '$t(target_connector_type)', '', '[{"label":"HIVE","value":"HIVE"},{"label":"JDBC","value":"JDBC"}]', 'Please select target connector type', 2, 0, 0, 1, 1, 1, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1106. INSERT INTO t_ds_dq_rule_input_entry
  1107. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1108. VALUES(12, 'target_datasource_id', 'select', '$t(target_datasource_id)', '', NULL, 'Please select target datasource', 1, 2, 0, 1, 1, 1, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1109. INSERT INTO t_ds_dq_rule_input_entry
  1110. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1111. VALUES(13, 'target_table', 'select', '$t(target_table)', NULL, NULL, 'Please enter target table', 0, 0, 0, 1, 1, 1, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1112. INSERT INTO t_ds_dq_rule_input_entry
  1113. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1114. VALUES(14, 'target_filter', 'input', '$t(target_filter)', NULL, NULL, 'Please enter target filter expression', 0, 3, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1115. INSERT INTO t_ds_dq_rule_input_entry
  1116. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1117. VALUES(15, 'mapping_columns', 'group', '$t(mapping_columns)', NULL, '[{"field":"src_field","props":{"placeholder":"Please input src field","rows":0,"disabled":false,"size":"small"},"type":"input","title":"src_field"},{"field":"operator","props":{"placeholder":"Please input operator","rows":0,"disabled":false,"size":"small"},"type":"input","title":"operator"},{"field":"target_field","props":{"placeholder":"Please input target field","rows":0,"disabled":false,"size":"small"},"type":"input","title":"target_field"}]', 'please enter mapping columns', 0, 0, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1118. INSERT INTO t_ds_dq_rule_input_entry
  1119. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1120. VALUES(16, 'statistics_execute_sql', 'textarea', '$t(statistics_execute_sql)', NULL, NULL, 'Please enter statistics execute sql', 0, 3, 0, 1, 1, 0, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1121. INSERT INTO t_ds_dq_rule_input_entry
  1122. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1123. VALUES(17, 'comparison_name', 'input', '$t(comparison_name)', NULL, NULL, 'Please enter comparison name, the alias in comparison execute sql', 0, 0, 0, 0, 0, 0, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1124. INSERT INTO t_ds_dq_rule_input_entry
  1125. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1126. VALUES(18, 'comparison_execute_sql', 'textarea', '$t(comparison_execute_sql)', NULL, NULL, 'Please enter comparison execute sql', 0, 3, 0, 1, 1, 0, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1127. INSERT INTO t_ds_dq_rule_input_entry
  1128. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1129. VALUES(19, 'comparison_type', 'select', '$t(comparison_type)', '', NULL, 'Please enter comparison title', 3, 0, 2, 1, 0, 1, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1130. INSERT INTO t_ds_dq_rule_input_entry
  1131. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1132. VALUES(20, 'writer_connector_type', 'select', '$t(writer_connector_type)', '', '[{"label":"MYSQL","value":"0"},{"label":"POSTGRESQL","value":"1"}]', 'please select writer connector type', 0, 2, 0, 1, 1, 1, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1133. INSERT INTO t_ds_dq_rule_input_entry
  1134. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1135. VALUES(21, 'writer_datasource_id', 'select', '$t(writer_datasource_id)', '', NULL, 'please select writer datasource id', 1, 2, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1136. INSERT INTO t_ds_dq_rule_input_entry
  1137. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1138. VALUES(22, 'target_field', 'select', '$t(target_field)', NULL, NULL, 'Please enter column, only single column is supported', 0, 0, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1139. INSERT INTO t_ds_dq_rule_input_entry
  1140. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1141. VALUES(23, 'field_length', 'input', '$t(field_length)', NULL, NULL, 'Please enter length limit', 0, 3, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1142. INSERT INTO t_ds_dq_rule_input_entry
  1143. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1144. VALUES(24, 'logic_operator', 'select', '$t(logic_operator)', '=', '[{"label":"=","value":"="},{"label":"<","value":"<"},{"label":"<=","value":"<="},{"label":">","value":">"},{"label":">=","value":">="},{"label":"<>","value":"<>"}]', 'please select logic operator', 0, 0, 3, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1145. INSERT INTO t_ds_dq_rule_input_entry
  1146. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1147. VALUES(25, 'regexp_pattern', 'input', '$t(regexp_pattern)', NULL, NULL, 'Please enter regexp pattern', 0, 0, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1148. INSERT INTO t_ds_dq_rule_input_entry
  1149. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1150. VALUES(26, 'deadline', 'input', '$t(deadline)', NULL, NULL, 'Please enter deadline', 0, 0, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1151. INSERT INTO t_ds_dq_rule_input_entry
  1152. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1153. VALUES(27, 'datetime_format', 'input', '$t(datetime_format)', NULL, NULL, 'Please enter datetime format', 0, 0, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1154. INSERT INTO t_ds_dq_rule_input_entry
  1155. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1156. VALUES(28, 'enum_list', 'input', '$t(enum_list)', NULL, NULL, 'Please enter enumeration', 0, 0, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1157. INSERT INTO t_ds_dq_rule_input_entry
  1158. (id, field, "type", title, value, "options", placeholder, option_source_type, value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time, update_time)
  1159. VALUES(29, 'begin_time', 'input', '$t(begin_time)', NULL, NULL, 'Please enter begin time', 0, 0, 0, 1, 1, 0, 0, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1160. --
  1161. -- Table structure for table t_ds_dq_task_statistics_value
  1162. --
  1163. DROP TABLE IF EXISTS t_ds_dq_task_statistics_value;
  1164. CREATE TABLE t_ds_dq_task_statistics_value (
  1165. id serial NOT NULL,
  1166. process_definition_id int4 NOT NULL,
  1167. task_instance_id int4 NULL,
  1168. rule_id int4 NOT NULL,
  1169. unique_code varchar NOT NULL,
  1170. statistics_name varchar NULL,
  1171. statistics_value float8 NULL,
  1172. data_time timestamp(0) NULL,
  1173. create_time timestamp(0) NULL,
  1174. update_time timestamp(0) NULL,
  1175. CONSTRAINT t_ds_dq_task_statistics_value_pk PRIMARY KEY (id)
  1176. );
  1177. --
  1178. -- Table structure for table t_ds_relation_rule_execute_sql
  1179. --
  1180. DROP TABLE IF EXISTS t_ds_relation_rule_execute_sql;
  1181. CREATE TABLE t_ds_relation_rule_execute_sql (
  1182. id serial NOT NULL,
  1183. rule_id int4 NULL,
  1184. execute_sql_id int4 NULL,
  1185. create_time timestamp NULL,
  1186. update_time timestamp NULL,
  1187. CONSTRAINT t_ds_relation_rule_execute_sql_pk PRIMARY KEY (id)
  1188. );
  1189. INSERT INTO t_ds_relation_rule_execute_sql
  1190. (id, rule_id, execute_sql_id, create_time, update_time)
  1191. VALUES(1, 1, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1192. INSERT INTO t_ds_relation_rule_execute_sql
  1193. (id, rule_id, execute_sql_id, create_time, update_time)
  1194. VALUES(3, 5, 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1195. INSERT INTO t_ds_relation_rule_execute_sql
  1196. (id, rule_id, execute_sql_id, create_time, update_time)
  1197. VALUES(2, 3, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1198. INSERT INTO t_ds_relation_rule_execute_sql
  1199. (id, rule_id, execute_sql_id, create_time, update_time)
  1200. VALUES(4, 3, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1201. INSERT INTO t_ds_relation_rule_execute_sql
  1202. (id, rule_id, execute_sql_id, create_time, update_time)
  1203. VALUES(5, 6, 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1204. INSERT INTO t_ds_relation_rule_execute_sql
  1205. (id, rule_id, execute_sql_id, create_time, update_time)
  1206. VALUES(6, 6, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1207. INSERT INTO t_ds_relation_rule_execute_sql
  1208. (id, rule_id, execute_sql_id, create_time, update_time)
  1209. VALUES(7, 7, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1210. INSERT INTO t_ds_relation_rule_execute_sql
  1211. (id, rule_id, execute_sql_id, create_time, update_time)
  1212. VALUES(8, 7, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1213. INSERT INTO t_ds_relation_rule_execute_sql
  1214. (id, rule_id, execute_sql_id, create_time, update_time)
  1215. VALUES(9, 8, 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1216. INSERT INTO t_ds_relation_rule_execute_sql
  1217. (id, rule_id, execute_sql_id, create_time, update_time)
  1218. VALUES(10, 8, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1219. INSERT INTO t_ds_relation_rule_execute_sql
  1220. (id, rule_id, execute_sql_id, create_time, update_time)
  1221. VALUES(11, 9, 13, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1222. INSERT INTO t_ds_relation_rule_execute_sql
  1223. (id, rule_id, execute_sql_id, create_time, update_time)
  1224. VALUES(12, 9, 14, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1225. INSERT INTO t_ds_relation_rule_execute_sql
  1226. (id, rule_id, execute_sql_id, create_time, update_time)
  1227. VALUES(13, 10, 15, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1228. INSERT INTO t_ds_relation_rule_execute_sql
  1229. (id, rule_id, execute_sql_id, create_time, update_time)
  1230. VALUES(14, 1, 16, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1231. INSERT INTO t_ds_relation_rule_execute_sql
  1232. (id, rule_id, execute_sql_id, create_time, update_time)
  1233. VALUES(15, 5, 17, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1234. --
  1235. -- Table structure for table t_ds_relation_rule_input_entry
  1236. --
  1237. DROP TABLE IF EXISTS t_ds_relation_rule_input_entry;
  1238. CREATE TABLE t_ds_relation_rule_input_entry (
  1239. id serial NOT NULL,
  1240. rule_id int4 NULL,
  1241. rule_input_entry_id int4 NULL,
  1242. values_map text NULL,
  1243. "index" int4 NULL,
  1244. create_time timestamp NULL,
  1245. update_time timestamp NULL,
  1246. CONSTRAINT t_ds_relation_rule_input_entry_pk PRIMARY KEY (id)
  1247. );
  1248. INSERT INTO t_ds_relation_rule_input_entry
  1249. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1250. VALUES(1, 1, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1251. INSERT INTO t_ds_relation_rule_input_entry
  1252. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1253. VALUES(2, 1, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1254. INSERT INTO t_ds_relation_rule_input_entry
  1255. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1256. VALUES(3, 1, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1257. INSERT INTO t_ds_relation_rule_input_entry
  1258. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1259. VALUES(4, 1, 4, NULL, 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1260. INSERT INTO t_ds_relation_rule_input_entry
  1261. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1262. VALUES(5, 1, 5, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1263. INSERT INTO t_ds_relation_rule_input_entry
  1264. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1265. VALUES(6, 1, 6, '{"statistics_name":"null_count.nulls"}', 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1266. INSERT INTO t_ds_relation_rule_input_entry
  1267. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1268. VALUES(7, 1, 7, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1269. INSERT INTO t_ds_relation_rule_input_entry
  1270. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1271. VALUES(8, 1, 8, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1272. INSERT INTO t_ds_relation_rule_input_entry
  1273. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1274. VALUES(9, 1, 9, NULL, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1275. INSERT INTO t_ds_relation_rule_input_entry
  1276. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1277. VALUES(10, 1, 10, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1278. INSERT INTO t_ds_relation_rule_input_entry
  1279. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1280. VALUES(11, 1, 17, '', 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1281. INSERT INTO t_ds_relation_rule_input_entry
  1282. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1283. VALUES(12, 1, 19, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1284. INSERT INTO t_ds_relation_rule_input_entry
  1285. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1286. VALUES(13, 2, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1287. INSERT INTO t_ds_relation_rule_input_entry
  1288. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1289. VALUES(14, 2, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1290. INSERT INTO t_ds_relation_rule_input_entry
  1291. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1292. VALUES(15, 2, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1293. INSERT INTO t_ds_relation_rule_input_entry
  1294. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1295. VALUES(16, 2, 6, '{"is_show":"true","can_edit":"true"}', 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1296. INSERT INTO t_ds_relation_rule_input_entry
  1297. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1298. VALUES(17, 2, 16, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1299. INSERT INTO t_ds_relation_rule_input_entry
  1300. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1301. VALUES(18, 2, 4, NULL, 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1302. INSERT INTO t_ds_relation_rule_input_entry
  1303. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1304. VALUES(19, 2, 7, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1305. INSERT INTO t_ds_relation_rule_input_entry
  1306. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1307. VALUES(20, 2, 8, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1308. INSERT INTO t_ds_relation_rule_input_entry
  1309. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1310. VALUES(21, 2, 9, NULL, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1311. INSERT INTO t_ds_relation_rule_input_entry
  1312. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1313. VALUES(22, 2, 10, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1314. INSERT INTO t_ds_relation_rule_input_entry
  1315. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1316. VALUES(24, 2, 19, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1317. INSERT INTO t_ds_relation_rule_input_entry
  1318. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1319. VALUES(25, 3, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1320. INSERT INTO t_ds_relation_rule_input_entry
  1321. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1322. VALUES(26, 3, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1323. INSERT INTO t_ds_relation_rule_input_entry
  1324. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1325. VALUES(27, 3, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1326. INSERT INTO t_ds_relation_rule_input_entry
  1327. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1328. VALUES(28, 3, 4, NULL, 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1329. INSERT INTO t_ds_relation_rule_input_entry
  1330. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1331. VALUES(29, 3, 11, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1332. INSERT INTO t_ds_relation_rule_input_entry
  1333. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1334. VALUES(30, 3, 12, NULL, 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1335. INSERT INTO t_ds_relation_rule_input_entry
  1336. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1337. VALUES(31, 3, 13, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1338. INSERT INTO t_ds_relation_rule_input_entry
  1339. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1340. VALUES(32, 3, 14, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1341. INSERT INTO t_ds_relation_rule_input_entry
  1342. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1343. VALUES(33, 3, 15, NULL, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1344. INSERT INTO t_ds_relation_rule_input_entry
  1345. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1346. VALUES(34, 3, 7, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1347. INSERT INTO t_ds_relation_rule_input_entry
  1348. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1349. VALUES(35, 3, 8, NULL, 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1350. INSERT INTO t_ds_relation_rule_input_entry
  1351. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1352. VALUES(36, 3, 9, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1353. INSERT INTO t_ds_relation_rule_input_entry
  1354. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1355. VALUES(37, 3, 10, NULL, 13, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1356. INSERT INTO t_ds_relation_rule_input_entry
  1357. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1358. VALUES(38, 3, 17, '{"comparison_name":"total_count.total"}', 14, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1359. INSERT INTO t_ds_relation_rule_input_entry
  1360. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1361. VALUES(39, 3, 19, NULL, 15, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1362. INSERT INTO t_ds_relation_rule_input_entry
  1363. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1364. VALUES(40, 4, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1365. INSERT INTO t_ds_relation_rule_input_entry
  1366. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1367. VALUES(41, 4, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1368. INSERT INTO t_ds_relation_rule_input_entry
  1369. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1370. VALUES(42, 4, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1371. INSERT INTO t_ds_relation_rule_input_entry
  1372. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1373. VALUES(43, 4, 6, '{"is_show":"true","can_edit":"true"}', 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1374. INSERT INTO t_ds_relation_rule_input_entry
  1375. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1376. VALUES(44, 4, 16, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1377. INSERT INTO t_ds_relation_rule_input_entry
  1378. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1379. VALUES(45, 4, 11, NULL, 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1380. INSERT INTO t_ds_relation_rule_input_entry
  1381. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1382. VALUES(46, 4, 12, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1383. INSERT INTO t_ds_relation_rule_input_entry
  1384. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1385. VALUES(47, 4, 13, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1386. INSERT INTO t_ds_relation_rule_input_entry
  1387. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1388. VALUES(48, 4, 17, '{"is_show":"true","can_edit":"true"}', 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1389. INSERT INTO t_ds_relation_rule_input_entry
  1390. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1391. VALUES(49, 4, 18, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1392. INSERT INTO t_ds_relation_rule_input_entry
  1393. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1394. VALUES(50, 4, 7, NULL, 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1395. INSERT INTO t_ds_relation_rule_input_entry
  1396. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1397. VALUES(51, 4, 8, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1398. INSERT INTO t_ds_relation_rule_input_entry
  1399. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1400. VALUES(52, 4, 9, NULL, 13, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1401. INSERT INTO t_ds_relation_rule_input_entry
  1402. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1403. VALUES(53, 4, 10, NULL, 14, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1404. INSERT INTO t_ds_relation_rule_input_entry
  1405. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1406. VALUES(62, 3, 6, '{"statistics_name":"miss_count.miss"}', 18, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1407. INSERT INTO t_ds_relation_rule_input_entry
  1408. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1409. VALUES(63, 5, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1410. INSERT INTO t_ds_relation_rule_input_entry
  1411. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1412. VALUES(64, 5, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1413. INSERT INTO t_ds_relation_rule_input_entry
  1414. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1415. VALUES(65, 5, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1416. INSERT INTO t_ds_relation_rule_input_entry
  1417. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1418. VALUES(66, 5, 4, NULL, 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1419. INSERT INTO t_ds_relation_rule_input_entry
  1420. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1421. VALUES(67, 5, 5, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1422. INSERT INTO t_ds_relation_rule_input_entry
  1423. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1424. VALUES(68, 5, 6, '{"statistics_name":"invalid_length_count.valids"}', 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1425. INSERT INTO t_ds_relation_rule_input_entry
  1426. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1427. VALUES(69, 5, 24, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1428. INSERT INTO t_ds_relation_rule_input_entry
  1429. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1430. VALUES(70, 5, 23, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1431. INSERT INTO t_ds_relation_rule_input_entry
  1432. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1433. VALUES(71, 5, 7, NULL, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1434. INSERT INTO t_ds_relation_rule_input_entry
  1435. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1436. VALUES(72, 5, 8, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1437. INSERT INTO t_ds_relation_rule_input_entry
  1438. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1439. VALUES(73, 5, 9, NULL, 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1440. INSERT INTO t_ds_relation_rule_input_entry
  1441. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1442. VALUES(74, 5, 10, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1443. INSERT INTO t_ds_relation_rule_input_entry
  1444. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1445. VALUES(75, 5, 17, '', 13, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1446. INSERT INTO t_ds_relation_rule_input_entry
  1447. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1448. VALUES(76, 5, 19, NULL, 14, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1449. INSERT INTO t_ds_relation_rule_input_entry
  1450. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1451. VALUES(79, 6, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1452. INSERT INTO t_ds_relation_rule_input_entry
  1453. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1454. VALUES(80, 6, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1455. INSERT INTO t_ds_relation_rule_input_entry
  1456. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1457. VALUES(81, 6, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1458. INSERT INTO t_ds_relation_rule_input_entry
  1459. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1460. VALUES(82, 6, 4, NULL, 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1461. INSERT INTO t_ds_relation_rule_input_entry
  1462. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1463. VALUES(83, 6, 5, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1464. INSERT INTO t_ds_relation_rule_input_entry
  1465. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1466. VALUES(84, 6, 6, '{"statistics_name":"duplicate_count.duplicates"}', 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1467. INSERT INTO t_ds_relation_rule_input_entry
  1468. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1469. VALUES(85, 6, 7, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1470. INSERT INTO t_ds_relation_rule_input_entry
  1471. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1472. VALUES(86, 6, 8, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1473. INSERT INTO t_ds_relation_rule_input_entry
  1474. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1475. VALUES(87, 6, 9, NULL, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1476. INSERT INTO t_ds_relation_rule_input_entry
  1477. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1478. VALUES(88, 6, 10, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1479. INSERT INTO t_ds_relation_rule_input_entry
  1480. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1481. VALUES(89, 6, 17, '', 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1482. INSERT INTO t_ds_relation_rule_input_entry
  1483. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1484. VALUES(90, 6, 19, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1485. INSERT INTO t_ds_relation_rule_input_entry
  1486. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1487. VALUES(93, 7, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1488. INSERT INTO t_ds_relation_rule_input_entry
  1489. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1490. VALUES(94, 7, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1491. INSERT INTO t_ds_relation_rule_input_entry
  1492. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1493. VALUES(95, 7, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1494. INSERT INTO t_ds_relation_rule_input_entry
  1495. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1496. VALUES(96, 7, 4, NULL, 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1497. INSERT INTO t_ds_relation_rule_input_entry
  1498. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1499. VALUES(97, 7, 5, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1500. INSERT INTO t_ds_relation_rule_input_entry
  1501. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1502. VALUES(98, 7, 6, '{"statistics_name":"regexp_count.regexps"}', 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1503. INSERT INTO t_ds_relation_rule_input_entry
  1504. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1505. VALUES(99, 7, 25, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1506. INSERT INTO t_ds_relation_rule_input_entry
  1507. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1508. VALUES(100, 7, 7, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1509. INSERT INTO t_ds_relation_rule_input_entry
  1510. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1511. VALUES(101, 7, 8, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1512. INSERT INTO t_ds_relation_rule_input_entry
  1513. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1514. VALUES(102, 7, 9, NULL, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1515. INSERT INTO t_ds_relation_rule_input_entry
  1516. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1517. VALUES(103, 7, 10, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1518. INSERT INTO t_ds_relation_rule_input_entry
  1519. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1520. VALUES(104, 7, 17, NULL, 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1521. INSERT INTO t_ds_relation_rule_input_entry
  1522. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1523. VALUES(105, 7, 19, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1524. INSERT INTO t_ds_relation_rule_input_entry
  1525. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1526. VALUES(108, 8, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1527. INSERT INTO t_ds_relation_rule_input_entry
  1528. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1529. VALUES(109, 8, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1530. INSERT INTO t_ds_relation_rule_input_entry
  1531. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1532. VALUES(110, 8, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1533. INSERT INTO t_ds_relation_rule_input_entry
  1534. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1535. VALUES(111, 8, 4, NULL, 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1536. INSERT INTO t_ds_relation_rule_input_entry
  1537. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1538. VALUES(112, 8, 5, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1539. INSERT INTO t_ds_relation_rule_input_entry
  1540. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1541. VALUES(113, 8, 6, '{"statistics_name":"timeliness_count.timeliness"}', 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1542. INSERT INTO t_ds_relation_rule_input_entry
  1543. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1544. VALUES(114, 8, 26, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1545. INSERT INTO t_ds_relation_rule_input_entry
  1546. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1547. VALUES(115, 8, 27, NULL, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1548. INSERT INTO t_ds_relation_rule_input_entry
  1549. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1550. VALUES(116, 8, 7, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1551. INSERT INTO t_ds_relation_rule_input_entry
  1552. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1553. VALUES(117, 8, 8, NULL, 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1554. INSERT INTO t_ds_relation_rule_input_entry
  1555. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1556. VALUES(118, 8, 9, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1557. INSERT INTO t_ds_relation_rule_input_entry
  1558. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1559. VALUES(119, 8, 10, NULL, 13, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1560. INSERT INTO t_ds_relation_rule_input_entry
  1561. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1562. VALUES(120, 8, 17, NULL, 14, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1563. INSERT INTO t_ds_relation_rule_input_entry
  1564. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1565. VALUES(121, 8, 19, NULL, 15, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1566. INSERT INTO t_ds_relation_rule_input_entry
  1567. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1568. VALUES(124, 9, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1569. INSERT INTO t_ds_relation_rule_input_entry
  1570. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1571. VALUES(125, 9, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1572. INSERT INTO t_ds_relation_rule_input_entry
  1573. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1574. VALUES(126, 9, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1575. INSERT INTO t_ds_relation_rule_input_entry
  1576. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1577. VALUES(127, 9, 4, NULL, 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1578. INSERT INTO t_ds_relation_rule_input_entry
  1579. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1580. VALUES(128, 9, 5, NULL, 5, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1581. INSERT INTO t_ds_relation_rule_input_entry
  1582. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1583. VALUES(129, 9, 6, '{"statistics_name":"enum_count.enums"}', 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1584. INSERT INTO t_ds_relation_rule_input_entry
  1585. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1586. VALUES(130, 9, 28, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1587. INSERT INTO t_ds_relation_rule_input_entry
  1588. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1589. VALUES(131, 9, 7, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1590. INSERT INTO t_ds_relation_rule_input_entry
  1591. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1592. VALUES(132, 9, 8, NULL, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1593. INSERT INTO t_ds_relation_rule_input_entry
  1594. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1595. VALUES(133, 9, 9, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1596. INSERT INTO t_ds_relation_rule_input_entry
  1597. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1598. VALUES(134, 9, 10, NULL, 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1599. INSERT INTO t_ds_relation_rule_input_entry
  1600. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1601. VALUES(135, 9, 17, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1602. INSERT INTO t_ds_relation_rule_input_entry
  1603. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1604. VALUES(136, 9, 19, NULL, 13, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1605. INSERT INTO t_ds_relation_rule_input_entry
  1606. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1607. VALUES(139, 10, 1, NULL, 1, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1608. INSERT INTO t_ds_relation_rule_input_entry
  1609. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1610. VALUES(140, 10, 2, NULL, 2, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1611. INSERT INTO t_ds_relation_rule_input_entry
  1612. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1613. VALUES(141, 10, 3, NULL, 3, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1614. INSERT INTO t_ds_relation_rule_input_entry
  1615. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1616. VALUES(142, 10, 4, NULL, 4, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1617. INSERT INTO t_ds_relation_rule_input_entry
  1618. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1619. VALUES(143, 10, 6, '{"statistics_name":"table_count.total"}', 6, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1620. INSERT INTO t_ds_relation_rule_input_entry
  1621. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1622. VALUES(144, 10, 7, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1623. INSERT INTO t_ds_relation_rule_input_entry
  1624. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1625. VALUES(145, 10, 8, NULL, 8, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1626. INSERT INTO t_ds_relation_rule_input_entry
  1627. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1628. VALUES(146, 10, 9, NULL, 9, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1629. INSERT INTO t_ds_relation_rule_input_entry
  1630. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1631. VALUES(147, 10, 10, NULL, 10, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1632. INSERT INTO t_ds_relation_rule_input_entry
  1633. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1634. VALUES(148, 10, 17, NULL, 11, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1635. INSERT INTO t_ds_relation_rule_input_entry
  1636. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1637. VALUES(149, 10, 19, NULL, 12, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1638. INSERT INTO t_ds_relation_rule_input_entry
  1639. (id, rule_id, rule_input_entry_id, values_map, "index", create_time, update_time)
  1640. VALUES(150, 8, 29, NULL, 7, '2021-03-03 11:31:24.000', '2021-03-03 11:31:24.000');
  1641. --
  1642. -- Table structure for table t_ds_environment
  1643. --
  1644. DROP TABLE IF EXISTS t_ds_environment;
  1645. CREATE TABLE t_ds_environment (
  1646. id serial NOT NULL,
  1647. code bigint NOT NULL,
  1648. name varchar(100) DEFAULT NULL,
  1649. config text DEFAULT NULL,
  1650. description text,
  1651. operator int DEFAULT NULL,
  1652. create_time timestamp DEFAULT NULL,
  1653. update_time timestamp DEFAULT NULL,
  1654. PRIMARY KEY (id),
  1655. CONSTRAINT environment_name_unique UNIQUE (name),
  1656. CONSTRAINT environment_code_unique UNIQUE (code)
  1657. );
  1658. --
  1659. -- Table structure for table t_ds_environment_worker_group_relation
  1660. --
  1661. DROP TABLE IF EXISTS t_ds_environment_worker_group_relation;
  1662. CREATE TABLE t_ds_environment_worker_group_relation (
  1663. id serial NOT NULL,
  1664. environment_code bigint NOT NULL,
  1665. worker_group varchar(255) NOT NULL,
  1666. operator int DEFAULT NULL,
  1667. create_time timestamp DEFAULT NULL,
  1668. update_time timestamp DEFAULT NULL,
  1669. PRIMARY KEY (id) ,
  1670. CONSTRAINT environment_worker_group_unique UNIQUE (environment_code,worker_group)
  1671. );
  1672. --
  1673. -- Table structure for table t_ds_task_group_queue
  1674. --
  1675. DROP TABLE IF EXISTS t_ds_task_group_queue;
  1676. CREATE TABLE t_ds_task_group_queue (
  1677. id serial NOT NULL,
  1678. task_id int DEFAULT NULL ,
  1679. task_name VARCHAR(100) DEFAULT NULL ,
  1680. group_id int DEFAULT NULL ,
  1681. process_id int DEFAULT NULL ,
  1682. priority int DEFAULT '0' ,
  1683. status int DEFAULT '-1' ,
  1684. force_start int DEFAULT '0' ,
  1685. in_queue int DEFAULT '0' ,
  1686. create_time timestamp DEFAULT NULL ,
  1687. update_time timestamp DEFAULT NULL ,
  1688. PRIMARY KEY (id)
  1689. );
  1690. --
  1691. -- Table structure for table t_ds_task_group
  1692. --
  1693. DROP TABLE IF EXISTS t_ds_task_group;
  1694. CREATE TABLE t_ds_task_group (
  1695. id serial NOT NULL,
  1696. name varchar(100) DEFAULT NULL ,
  1697. description varchar(200) DEFAULT NULL ,
  1698. group_size int NOT NULL ,
  1699. project_code bigint DEFAULT '0' ,
  1700. use_size int DEFAULT '0' ,
  1701. user_id int DEFAULT NULL ,
  1702. status int DEFAULT '1' ,
  1703. create_time timestamp DEFAULT NULL ,
  1704. update_time timestamp DEFAULT NULL ,
  1705. PRIMARY KEY(id)
  1706. );
  1707. -- ----------------------------
  1708. -- Table structure for t_ds_audit_log
  1709. -- ----------------------------
  1710. DROP TABLE IF EXISTS t_ds_audit_log;
  1711. CREATE TABLE t_ds_audit_log (
  1712. id serial NOT NULL,
  1713. user_id int NOT NULL,
  1714. resource_type int NOT NULL,
  1715. operation int NOT NULL,
  1716. time timestamp DEFAULT NULL ,
  1717. resource_id int NOT NULL,
  1718. PRIMARY KEY (id)
  1719. );
  1720. --
  1721. -- Table structure for table t_ds_k8s
  1722. --
  1723. DROP TABLE IF EXISTS t_ds_k8s;
  1724. CREATE TABLE t_ds_k8s (
  1725. id serial NOT NULL,
  1726. k8s_name VARCHAR(100) DEFAULT NULL ,
  1727. k8s_config text ,
  1728. create_time timestamp DEFAULT NULL ,
  1729. update_time timestamp DEFAULT NULL ,
  1730. PRIMARY KEY (id)
  1731. );
  1732. --
  1733. -- Table structure for table t_ds_k8s_namespace
  1734. --
  1735. DROP TABLE IF EXISTS t_ds_k8s_namespace;
  1736. CREATE TABLE t_ds_k8s_namespace (
  1737. id serial NOT NULL,
  1738. limits_memory int DEFAULT NULL ,
  1739. namespace varchar(100) DEFAULT NULL ,
  1740. online_job_num int DEFAULT '0' ,
  1741. owner varchar(100) DEFAULT NULL,
  1742. pod_replicas int DEFAULT NULL,
  1743. pod_request_cpu NUMERIC(13,4) NULL,
  1744. pod_request_memory int DEFAULT NULL,
  1745. tag varchar(100) DEFAULT NULL,
  1746. limits_cpu NUMERIC(13,4) NULL,
  1747. k8s varchar(100) DEFAULT NULL,
  1748. create_time timestamp DEFAULT NULL ,
  1749. update_time timestamp DEFAULT NULL ,
  1750. PRIMARY KEY (id) ,
  1751. CONSTRAINT k8s_namespace_unique UNIQUE (namespace,k8s)
  1752. );