UpdateTable.sql 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. ALTER TABLE "public"."post_checked" RENAME COLUMN "remark_info" TO remark;
  2. ALTER TABLE "public"."post_checked" RENAME COLUMN "is_del" TO del_flag;
  3. ALTER TABLE "public"."post_checked" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  4. ALTER TABLE "public"."post_checked" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  5. ALTER TABLE "public"."post_checked" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  6. ALTER TABLE "public"."post_checked" RENAME COLUMN "create_date" TO create_time;
  7. ALTER TABLE "public"."post_checked" RENAME COLUMN "create_user_id" TO create_by;
  8. ALTER TABLE "public"."post_checked" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  9. ALTER TABLE "public"."post_checked" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  10. ALTER TABLE "public"."post_checked" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  11. ALTER TABLE "public"."post_checked" RENAME COLUMN "update_date" TO update_time;
  12. ALTER TABLE "public"."post_checked" RENAME COLUMN "update_user_id" TO update_by;
  13. ALTER TABLE "public"."post_checked" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  14. ALTER TABLE "public"."post_checked" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  15. ALTER TABLE "public"."post_checked_items" RENAME COLUMN "remark_info" TO remark;
  16. ALTER TABLE "public"."post_checked_items" RENAME COLUMN "is_del" TO del_flag;
  17. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  18. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  19. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  20. ALTER TABLE "public"."post_checked_items" RENAME COLUMN "create_date" TO create_time;
  21. ALTER TABLE "public"."post_checked_items" RENAME COLUMN "create_user_id" TO create_by;
  22. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  23. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  24. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  25. ALTER TABLE "public"."post_checked_items" RENAME COLUMN "update_date" TO update_time;
  26. ALTER TABLE "public"."post_checked_items" RENAME COLUMN "update_user_id" TO update_by;
  27. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  28. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  29. ALTER TABLE "public"."post_checked_problem" RENAME COLUMN "remark_info" TO remark;
  30. ALTER TABLE "public"."post_checked_problem" RENAME COLUMN "is_del" TO del_flag;
  31. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  32. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  33. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  34. ALTER TABLE "public"."post_checked_problem" RENAME COLUMN "create_date" TO create_time;
  35. ALTER TABLE "public"."post_checked_problem" RENAME COLUMN "create_user_id" TO create_by;
  36. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  37. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  38. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  39. ALTER TABLE "public"."post_checked_problem" RENAME COLUMN "update_date" TO update_time;
  40. ALTER TABLE "public"."post_checked_problem" RENAME COLUMN "update_user_id" TO update_by;
  41. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  42. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  43. ALTER TABLE "public"."post_checked_report" RENAME COLUMN "remark_info" TO remark;
  44. ALTER TABLE "public"."post_checked_report" RENAME COLUMN "is_del" TO del_flag;
  45. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  46. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  47. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  48. ALTER TABLE "public"."post_checked_report" RENAME COLUMN "create_date" TO create_time;
  49. ALTER TABLE "public"."post_checked_report" RENAME COLUMN "create_user_id" TO create_by;
  50. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  51. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  52. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  53. ALTER TABLE "public"."post_checked_report" RENAME COLUMN "update_date" TO update_time;
  54. ALTER TABLE "public"."post_checked_report" RENAME COLUMN "update_user_id" TO update_by;
  55. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  56. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  57. ALTER TABLE "public"."post_highlights" RENAME COLUMN "remark_info" TO remark;
  58. ALTER TABLE "public"."post_highlights" RENAME COLUMN "is_del" TO del_flag;
  59. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  60. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  61. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  62. ALTER TABLE "public"."post_highlights" RENAME COLUMN "create_date" TO create_time;
  63. ALTER TABLE "public"."post_highlights" RENAME COLUMN "create_user_id" TO create_by;
  64. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  65. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  66. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  67. ALTER TABLE "public"."post_highlights" RENAME COLUMN "update_date" TO update_time;
  68. ALTER TABLE "public"."post_highlights" RENAME COLUMN "update_user_id" TO update_by;
  69. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  70. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  71. ALTER TABLE "public"."post_list" RENAME COLUMN "remark_info" TO remark;
  72. ALTER TABLE "public"."post_list" RENAME COLUMN "is_del" TO del_flag;
  73. ALTER TABLE "public"."post_list" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  74. ALTER TABLE "public"."post_list" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  75. ALTER TABLE "public"."post_list" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  76. ALTER TABLE "public"."post_list" RENAME COLUMN "create_date" TO create_time;
  77. ALTER TABLE "public"."post_list" RENAME COLUMN "create_user_id" TO create_by;
  78. ALTER TABLE "public"."post_list" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  79. ALTER TABLE "public"."post_list" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  80. ALTER TABLE "public"."post_list" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  81. ALTER TABLE "public"."post_list" RENAME COLUMN "update_date" TO update_time;
  82. ALTER TABLE "public"."post_list" RENAME COLUMN "update_user_id" TO update_by;
  83. ALTER TABLE "public"."post_list" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  84. ALTER TABLE "public"."post_list" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  85. ALTER TABLE "public"."post_list_info" RENAME COLUMN "remark_info" TO remark;
  86. ALTER TABLE "public"."post_list_info" RENAME COLUMN "is_del" TO del_flag;
  87. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  88. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  89. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  90. ALTER TABLE "public"."post_list_info" RENAME COLUMN "create_date" TO create_time;
  91. ALTER TABLE "public"."post_list_info" RENAME COLUMN "create_user_id" TO create_by;
  92. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  93. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  94. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  95. ALTER TABLE "public"."post_list_info" RENAME COLUMN "update_date" TO update_time;
  96. ALTER TABLE "public"."post_list_info" RENAME COLUMN "update_user_id" TO update_by;
  97. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  98. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  99. ALTER TABLE "public"."post_plan" RENAME COLUMN "remark_info" TO remark;
  100. ALTER TABLE "public"."post_plan" RENAME COLUMN "is_del" TO del_flag;
  101. ALTER TABLE "public"."post_plan" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  102. ALTER TABLE "public"."post_plan" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  103. ALTER TABLE "public"."post_plan" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  104. ALTER TABLE "public"."post_plan" RENAME COLUMN "create_date" TO create_time;
  105. ALTER TABLE "public"."post_plan" RENAME COLUMN "create_user_id" TO create_by;
  106. ALTER TABLE "public"."post_plan" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  107. ALTER TABLE "public"."post_plan" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  108. ALTER TABLE "public"."post_plan" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  109. ALTER TABLE "public"."post_plan" RENAME COLUMN "update_date" TO update_time;
  110. ALTER TABLE "public"."post_plan" RENAME COLUMN "update_user_id" TO update_by;
  111. ALTER TABLE "public"."post_plan" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  112. ALTER TABLE "public"."post_plan" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  113. ALTER TABLE "public"."post_plan_info" RENAME COLUMN "remark_info" TO remark;
  114. ALTER TABLE "public"."post_plan_info" RENAME COLUMN "is_del" TO del_flag;
  115. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  116. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  117. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  118. ALTER TABLE "public"."post_plan_info" RENAME COLUMN "create_date" TO create_time;
  119. ALTER TABLE "public"."post_plan_info" RENAME COLUMN "create_user_id" TO create_by;
  120. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  121. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  122. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  123. ALTER TABLE "public"."post_plan_info" RENAME COLUMN "update_date" TO update_time;
  124. ALTER TABLE "public"."post_plan_info" RENAME COLUMN "update_user_id" TO update_by;
  125. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  126. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  127. ALTER TABLE "public"."post_plan_info_user" RENAME COLUMN "remark_info" TO remark;
  128. ALTER TABLE "public"."post_plan_info_user" RENAME COLUMN "is_del" TO del_flag;
  129. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  130. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  131. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  132. ALTER TABLE "public"."post_plan_info_user" RENAME COLUMN "create_date" TO create_time;
  133. ALTER TABLE "public"."post_plan_info_user" RENAME COLUMN "create_user_id" TO create_by;
  134. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  135. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  136. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  137. ALTER TABLE "public"."post_plan_info_user" RENAME COLUMN "update_date" TO update_time;
  138. ALTER TABLE "public"."post_plan_info_user" RENAME COLUMN "update_user_id" TO update_by;
  139. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  140. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  141. ALTER TABLE "public"."post_programme" RENAME COLUMN "remark_info" TO remark;
  142. ALTER TABLE "public"."post_programme" RENAME COLUMN "is_del" TO del_flag;
  143. ALTER TABLE "public"."post_programme" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  144. ALTER TABLE "public"."post_programme" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  145. ALTER TABLE "public"."post_programme" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  146. ALTER TABLE "public"."post_programme" RENAME COLUMN "create_date" TO create_time;
  147. ALTER TABLE "public"."post_programme" RENAME COLUMN "create_user_id" TO create_by;
  148. ALTER TABLE "public"."post_programme" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  149. ALTER TABLE "public"."post_programme" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  150. ALTER TABLE "public"."post_programme" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  151. ALTER TABLE "public"."post_programme" RENAME COLUMN "update_date" TO update_time;
  152. ALTER TABLE "public"."post_programme" RENAME COLUMN "update_user_id" TO update_by;
  153. ALTER TABLE "public"."post_programme" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  154. ALTER TABLE "public"."post_programme" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  155. ALTER TABLE "public"."post_programme_template" RENAME COLUMN "remark_info" TO remark;
  156. ALTER TABLE "public"."post_programme_template" RENAME COLUMN "is_del" TO del_flag;
  157. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  158. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  159. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  160. ALTER TABLE "public"."post_programme_template" RENAME COLUMN "create_date" TO create_time;
  161. ALTER TABLE "public"."post_programme_template" RENAME COLUMN "create_user_id" TO create_by;
  162. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  163. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  164. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  165. ALTER TABLE "public"."post_programme_template" RENAME COLUMN "update_date" TO update_time;
  166. ALTER TABLE "public"."post_programme_template" RENAME COLUMN "update_user_id" TO update_by;
  167. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  168. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  169. ALTER TABLE "public"."post_team" RENAME COLUMN "remark_info" TO remark;
  170. ALTER TABLE "public"."post_team" RENAME COLUMN "is_del" TO del_flag;
  171. ALTER TABLE "public"."post_team" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  172. ALTER TABLE "public"."post_team" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  173. ALTER TABLE "public"."post_team" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  174. ALTER TABLE "public"."post_team" RENAME COLUMN "create_date" TO create_time;
  175. ALTER TABLE "public"."post_team" RENAME COLUMN "create_user_id" TO create_by;
  176. ALTER TABLE "public"."post_team" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  177. ALTER TABLE "public"."post_team" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  178. ALTER TABLE "public"."post_team" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  179. ALTER TABLE "public"."post_team" RENAME COLUMN "update_date" TO update_time;
  180. ALTER TABLE "public"."post_team" RENAME COLUMN "update_user_id" TO update_by;
  181. ALTER TABLE "public"."post_team" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  182. ALTER TABLE "public"."post_team" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  183. ALTER TABLE "public"."post_team_user" RENAME COLUMN "remark_info" TO remark;
  184. ALTER TABLE "public"."post_team_user" RENAME COLUMN "is_del" TO del_flag;
  185. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "del_flag" CHARACTER(1 char);
  186. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "del_flag" CHARACTER DEFAULT '0'::bpchar;
  187. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "del_flag" CHARACTER COMMENT '删除标志(0代表存在 2代表删除)';
  188. ALTER TABLE "public"."post_team_user" RENAME COLUMN "create_date" TO create_time;
  189. ALTER TABLE "public"."post_team_user" RENAME COLUMN "create_user_id" TO create_by;
  190. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "create_by" CHARACTER VARYING(64 char);
  191. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "create_by" CHARACTER VARYING DEFAULT ''::varchar;
  192. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "create_by" CHARACTER VARYING COMMENT '创建者';
  193. ALTER TABLE "public"."post_team_user" RENAME COLUMN "update_date" TO update_time;
  194. ALTER TABLE "public"."post_team_user" RENAME COLUMN "update_user_id" TO update_by;
  195. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "update_by" bigint DEFAULT ''::varchar;
  196. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "update_by" bigint COMMENT '更新者';
  197. ALTER TABLE "public"."post_checked" MODIFY COLUMN "create_by" varchar(64);
  198. ALTER TABLE "public"."post_checked" MODIFY COLUMN "update_by" varchar(64);
  199. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "create_by" varchar(64);
  200. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "update_by" varchar(64);
  201. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "create_by" varchar(64);
  202. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "update_by" varchar(64);
  203. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "create_by" varchar(64);
  204. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "update_by" varchar(64);
  205. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "create_by" varchar(64);
  206. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "update_by" varchar(64);
  207. ALTER TABLE "public"."post_list" MODIFY COLUMN "create_by" varchar(64);
  208. ALTER TABLE "public"."post_list" MODIFY COLUMN "update_by" varchar(64);
  209. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "create_by" varchar(64);
  210. ALTER TABLE "public"."post_list_info" MODIFY COLUMN "update_by" varchar(64);
  211. ALTER TABLE "public"."post_plan" MODIFY COLUMN "create_by" varchar(64);
  212. ALTER TABLE "public"."post_plan" MODIFY COLUMN "update_by" varchar(64);
  213. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "create_by" varchar(64);
  214. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "update_by" varchar(64);
  215. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "create_by" varchar(64);
  216. ALTER TABLE "public"."post_plan_info_user" MODIFY COLUMN "update_by" varchar(64);
  217. ALTER TABLE "public"."post_programme" MODIFY COLUMN "create_by" varchar(64);
  218. ALTER TABLE "public"."post_programme" MODIFY COLUMN "update_by" varchar(64);
  219. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "create_by" varchar(64);
  220. ALTER TABLE "public"."post_programme_template" MODIFY COLUMN "update_by" varchar(64);
  221. ALTER TABLE "public"."post_team" MODIFY COLUMN "create_by" varchar(64);
  222. ALTER TABLE "public"."post_team" MODIFY COLUMN "update_by" varchar(64);
  223. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "create_by" varchar(64);
  224. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "update_by" varchar(64);
  225. ALTER TABLE "public"."post_checked" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  226. ALTER TABLE "public"."post_checked_items" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  227. ALTER TABLE "public"."post_checked_problem" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  228. ALTER TABLE "public"."post_checked_report" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  229. ALTER TABLE "public"."post_highlights" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  230. ALTER TABLE "public"."post_list" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  231. ALTER TABLE "public"."post_list_info" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  232. ALTER TABLE "public"."post_plan" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  233. ALTER TABLE "public"."post_plan_info" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  234. ALTER TABLE "public"."post_plan_info_user" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  235. ALTER TABLE "public"."post_programme" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  236. ALTER TABLE "public"."post_programme_template" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  237. ALTER TABLE "public"."post_team" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  238. ALTER TABLE "public"."post_team_user" ADD COLUMN create_user_id bigint COMMENT '创建者用户ID';
  239. ALTER TABLE "public"."post_programme" MODIFY COLUMN "post_programme_template_id" bigint COMMENT '废弃-因为改为多模板共存了:方案模板表ID';
  240. ALTER TABLE "public"."post_team" ADD COLUMN TYPE integer COMMENT '类型:1-联合办公室;2-岗检工作组;3-工作小组;';
  241. CREATE TABLE "public"."post_team_dept" (
  242. "id" bigint NOT NULL,
  243. "post_team_id" character varying(255 char) NULL,
  244. "dept_id" bigint NULL,
  245. "type" integer NULL,
  246. "remark" character varying(500 char) NULL,
  247. "del_flag" character(1 char) NOT NULL DEFAULT '0'::bpchar,
  248. "create_time" timestamp(0) with time zone NOT NULL,
  249. "create_by" character varying(64 char) NOT NULL DEFAULT ''::varchar,
  250. "update_time" timestamp(0) with time zone NOT NULL,
  251. "update_by" character varying(64 char) NOT NULL DEFAULT ''::varchar,
  252. "create_user_id" bigint NULL,
  253. PRIMARY KEY (id)
  254. );
  255. ALTER TABLE "public"."post_team_dept" COMMENT '岗检工作组关联部门';
  256. ALTER TABLE "public"."post_team_dept" MODIFY "id" COMMENT '主键ID';
  257. ALTER TABLE "public"."post_team_dept" MODIFY "post_team_id" COMMENT '岗检小组ID';
  258. ALTER TABLE "public"."post_team_dept" MODIFY "dept_id" COMMENT '部门ID';
  259. ALTER TABLE "public"."post_team_dept" MODIFY "type" COMMENT '类型(1-牵头部门;2-成员部门)';
  260. ALTER TABLE "public"."post_team_dept" MODIFY "remark" COMMENT '备注';
  261. ALTER TABLE "public"."post_team_dept" MODIFY "del_flag" COMMENT '删除标志(0代表存在 2代表删除)';
  262. ALTER TABLE "public"."post_team_dept" MODIFY "create_time" COMMENT '创建时间';
  263. ALTER TABLE "public"."post_team_dept" MODIFY "create_by" COMMENT '创建者';
  264. ALTER TABLE "public"."post_team_dept" MODIFY "update_time" COMMENT '更新时间';
  265. ALTER TABLE "public"."post_team_dept" MODIFY "update_by" COMMENT '更新者';
  266. ALTER TABLE "public"."post_team_dept" MODIFY "create_user_id" COMMENT '创建者用户ID';
  267. ALTER TABLE "public"."post_team_dept" MODIFY COLUMN "dept_id" bigint NOT NULL;
  268. ALTER TABLE "public"."post_team_dept" MODIFY COLUMN "type" integer NOT NULL;
  269. ALTER TABLE "public"."post_team_dept" MODIFY COLUMN "type" integer DEFAULT 1;
  270. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "type" integer COMMENT '类型(1-负责人;2-小组成员;)';
  271. ALTER TABLE "public"."post_plan" ADD COLUMN check_workgroup_id bigint NOT NULL COMMENT '检查工作组ID';
  272. ALTER TABLE "public"."post_plan" ADD COLUMN check_group_id bigint NOT NULL COMMENT '检查小组';
  273. ALTER TABLE "public"."post_plan_info" DROP COLUMN "check_group_id";
  274. ALTER TABLE "public"."post_plan_info" RENAME COLUMN "check_workgroup_id" TO post_id;
  275. ALTER TABLE "public"."post_plan_info" MODIFY COLUMN "post_id" bigint COMMENT '被检查岗位ID';
  276. ALTER TABLE "public"."post_programme" DROP COLUMN "post_programme_template_id";
  277. ALTER TABLE "public"."post_programme" ADD COLUMN disk_path varchar(255) NOT NULL COMMENT '岗检方案文件地址';
  278. CREATE TABLE "public"."post_checked_problem" (
  279. "id" bigint NOT NULL,
  280. "status" integer NOT NULL DEFAULT 1,
  281. "problem_no" character varying(255 char) NOT NULL,
  282. "check_workgroup_id" bigint NOT NULL,
  283. "check_group_id" bigint NOT NULL,
  284. "check_user_id" bigint NOT NULL,
  285. "dept_approve_user_id" bigint NULL,
  286. "dept_approve_time" timestamp(0) with time zone NULL,
  287. "speciality_department_reviewer_id" bigint NULL,
  288. "speciality_department_review_time" timestamp with time zone NULL,
  289. "problem_level" character varying(255 char) NOT NULL,
  290. "problem_attribute" character varying(255 char) NOT NULL,
  291. "problem_category" character varying(255 char) NOT NULL,
  292. "description" character varying(512 char) NULL,
  293. "problem_cause" character varying(512 char) NULL,
  294. "is_immediately_corrected" integer NOT NULL,
  295. "rectification_measure" character varying(512 char) NULL,
  296. "checked_dept_id" bigint NOT NULL,
  297. "checked_post_id" bigint NOT NULL,
  298. "rectification_responsible_user_id" bigint NULL,
  299. "rectification_period" timestamp(0) with time zone NULL,
  300. "is_rectification_completed" integer NULL,
  301. "rectification_completion_time" timestamp(0) with time zone NULL,
  302. "rectification_completion_img" character varying(255 char) NULL,
  303. "review_department_reviewer_id" bigint NULL,
  304. "review_department_reviewer_time" datetime NULL,
  305. "review_conclusion" character varying(255 char) NULL,
  306. "reason" character varying(255 char) NULL,
  307. "remark" character varying(500 char) NULL,
  308. "del_flag" character(1 char) NOT NULL DEFAULT '0'::bpchar,
  309. "create_time" timestamp(0) with time zone NOT NULL,
  310. "create_by" character varying(64 char) NOT NULL DEFAULT ''::varchar,
  311. "update_time" timestamp(0) with time zone NOT NULL,
  312. "update_by" character varying(64 char) NOT NULL DEFAULT ''::varchar,
  313. "create_user_id" bigint NULL,
  314. "check_time" datetime NULL,
  315. CONSTRAINT "post_checked_problem_pkey" PRIMARY KEY (id)
  316. );
  317. ALTER TABLE "public"."post_checked_problem" COMMENT '岗检问题录入表';
  318. ALTER TABLE "public"."post_checked_problem" MODIFY "id" COMMENT '主键ID';
  319. ALTER TABLE "public"."post_checked_problem" MODIFY "status" COMMENT '状态:1-待指定整改人(问题录入完成时);2-待填写方案(部门管理员指定整改人后);3-方案填写完成;10-部门审核通过;11-部门审核驳回;20-专业部门人审核(非必填)通过;21-专业部门人审核驳回(非必填);30-整改人待上传实施(整改人上传实施图片);31-上传实施照片完成;40-复查部门人审核通过;41-复查部门人审核驳回';
  320. ALTER TABLE "public"."post_checked_problem" MODIFY "problem_no" COMMENT '问题编号(需要甲方提供规则规则)';
  321. ALTER TABLE "public"."post_checked_problem" MODIFY "check_workgroup_id" COMMENT '检查工作组ID';
  322. ALTER TABLE "public"."post_checked_problem" MODIFY "check_group_id" COMMENT '检查小组ID';
  323. ALTER TABLE "public"."post_checked_problem" MODIFY "check_user_id" COMMENT '检查人员ID';
  324. ALTER TABLE "public"."post_checked_problem" MODIFY "dept_approve_user_id" COMMENT '审核1:整改部门经理ID';
  325. ALTER TABLE "public"."post_checked_problem" MODIFY "dept_approve_time" COMMENT '审核1:整改部门经理审核时间';
  326. ALTER TABLE "public"."post_checked_problem" MODIFY "speciality_department_reviewer_id" COMMENT '审核2:专业部门的审核人ID(非必选,方案填写人选择)';
  327. ALTER TABLE "public"."post_checked_problem" MODIFY "speciality_department_review_time" COMMENT '审核2:专业部门审核人审核时间';
  328. ALTER TABLE "public"."post_checked_problem" MODIFY "problem_level" COMMENT '问题等级(一般、重要)';
  329. ALTER TABLE "public"."post_checked_problem" MODIFY "problem_attribute" COMMENT '问题属性(完整问题、有效性问题、适宜性问题)';
  330. ALTER TABLE "public"."post_checked_problem" MODIFY "problem_category" COMMENT '问题类别(职责权限问题、工作内容问题、工作标准问题、考核奖励问题、任职资格问题、其他)';
  331. ALTER TABLE "public"."post_checked_problem" MODIFY "description" COMMENT '问题描述';
  332. ALTER TABLE "public"."post_checked_problem" MODIFY "problem_cause" COMMENT '问题原因';
  333. ALTER TABLE "public"."post_checked_problem" MODIFY "is_immediately_corrected" COMMENT '是否立行立改(1-Yes;2-No;)';
  334. ALTER TABLE "public"."post_checked_problem" MODIFY "rectification_measure" COMMENT '整改措施';
  335. ALTER TABLE "public"."post_checked_problem" MODIFY "checked_dept_id" COMMENT '整改责任部门ID(被检查部门ID)';
  336. ALTER TABLE "public"."post_checked_problem" MODIFY "checked_post_id" COMMENT '整改责任岗位ID(被检查岗位ID)';
  337. ALTER TABLE "public"."post_checked_problem" MODIFY "rectification_responsible_user_id" COMMENT '整改责任人ID';
  338. ALTER TABLE "public"."post_checked_problem" MODIFY "rectification_period" COMMENT '整改期限';
  339. ALTER TABLE "public"."post_checked_problem" MODIFY "is_rectification_completed" COMMENT '整改情况-是否完成(1-Yes;2-No;)';
  340. ALTER TABLE "public"."post_checked_problem" MODIFY "rectification_completion_time" COMMENT '整改完成时间';
  341. ALTER TABLE "public"."post_checked_problem" MODIFY "rectification_completion_img" COMMENT '整改完成图片磁盘路径';
  342. ALTER TABLE "public"."post_checked_problem" MODIFY "review_department_reviewer_id" COMMENT '审核3:复查部门的审核人ID(措施上传时必选,实施人选择)';
  343. ALTER TABLE "public"."post_checked_problem" MODIFY "review_department_reviewer_time" COMMENT '审核3:复查部门的审核人复查时间';
  344. ALTER TABLE "public"."post_checked_problem" MODIFY "review_conclusion" COMMENT '复查结论';
  345. ALTER TABLE "public"."post_checked_problem" MODIFY "reason" COMMENT '未通过理由';
  346. ALTER TABLE "public"."post_checked_problem" MODIFY "remark" COMMENT '备注';
  347. ALTER TABLE "public"."post_checked_problem" MODIFY "del_flag" COMMENT '删除标志(0代表存在 2代表删除)';
  348. ALTER TABLE "public"."post_checked_problem" MODIFY "create_time" COMMENT '创建时间';
  349. ALTER TABLE "public"."post_checked_problem" MODIFY "create_by" COMMENT '创建者';
  350. ALTER TABLE "public"."post_checked_problem" MODIFY "update_time" COMMENT '更新时间';
  351. ALTER TABLE "public"."post_checked_problem" MODIFY "update_by" COMMENT '更新者';
  352. ALTER TABLE "public"."post_checked_problem" MODIFY "create_user_id" COMMENT '创建者用户ID';
  353. ALTER TABLE "public"."post_checked_problem" MODIFY "check_time" COMMENT '检查时间';
  354. CREATE TABLE "public"."post_checked_problem_record" (
  355. "id" bigint NOT NULL,
  356. "problem_id" bigint NOT NULL,
  357. "user_by" varchar NOT NULL,
  358. "content" varchar NOT NULL,
  359. "remark" character varying(500 char) NULL,
  360. "del_flag" character(1 char) NOT NULL DEFAULT '0'::bpchar,
  361. "create_time" timestamp(0) with time zone NOT NULL,
  362. "create_by" character varying(64 char) NOT NULL DEFAULT ''::varchar,
  363. "update_time" timestamp(0) with time zone NOT NULL,
  364. "update_by" character varying(64 char) NOT NULL DEFAULT ''::varchar,
  365. "create_user_id" bigint NULL,
  366. "check_time" datetime NULL,
  367. CONSTRAINT "post_checked_problem_record_pkey" PRIMARY KEY (id)
  368. );
  369. ALTER TABLE "public"."post_checked_problem_record" MODIFY "id" COMMENT '主键ID';
  370. ALTER TABLE "public"."post_checked_problem_record" MODIFY "problem_id" COMMENT '问题ID(多)';
  371. ALTER TABLE "public"."post_checked_problem_record" MODIFY "user_by" COMMENT '操作者姓名';
  372. ALTER TABLE "public"."post_checked_problem_record" MODIFY "content" COMMENT '操作内容';
  373. ALTER TABLE "public"."post_checked_problem_record" MODIFY "remark" COMMENT '备注';
  374. ALTER TABLE "public"."post_checked_problem_record" MODIFY "del_flag" COMMENT '删除标志(0代表存在 2代表删除)';
  375. ALTER TABLE "public"."post_checked_problem_record" MODIFY "create_time" COMMENT '创建时间';
  376. ALTER TABLE "public"."post_checked_problem_record" MODIFY "create_by" COMMENT '创建者';
  377. ALTER TABLE "public"."post_checked_problem_record" MODIFY "update_time" COMMENT '更新时间';
  378. ALTER TABLE "public"."post_checked_problem_record" MODIFY "update_by" COMMENT '更新者';
  379. ALTER TABLE "public"."post_programme" ADD COLUMN dept_id bigint COMMENT '提交部门ID';
  380. ALTER TABLE "public"."post_programme" ADD COLUMN dept_name varchar(64) COMMENT '提交部门名称';
  381. ALTER TABLE "public"."post_plan" MODIFY COLUMN "status" integer NOT NULL;
  382. ALTER TABLE "public"."post_plan" ADD COLUMN status_icfa INT NULL COMMENT '1-内控法务部审批-状态:1-待审核;3-通过;4-驳回;';
  383. ALTER TABLE "public"."post_plan" ADD COLUMN date_icfa DATETIME NULL COMMENT '1-内控法务部审批-通过日期';
  384. ALTER TABLE "public"."post_plan" ADD COLUMN reason_icfa varchar(255) NULL COMMENT '1-内控法务部审批-未通过理由';
  385. ALTER TABLE "public"."post_plan" ADD COLUMN status_hr int NULL COMMENT '2-人力资源审批-状态:1-待审核;3-通过;4-驳回;';
  386. ALTER TABLE "public"."post_plan" ADD COLUMN date_hr DATETIME NULL COMMENT '2-人力资源审批-通过日期';
  387. ALTER TABLE "public"."post_plan" ADD COLUMN reason_hr varchar(255) NULL COMMENT '2-人力资源审批-未通过理由';
  388. ALTER TABLE "public"."post_programme" MODIFY COLUMN "status_hr" integer COMMENT '1-人力资源审批-状态:1-待审核;3-通过;4-驳回;';
  389. ALTER TABLE "public"."post_programme" MODIFY COLUMN "date_hr" timestamp WITH time ZONE COMMENT '1-人力资源审批-通过日期';
  390. ALTER TABLE "public"."post_programme" MODIFY COLUMN "reason_hr" CHARACTER VARYING COMMENT '1-人力资源审批-未通过理由';
  391. ALTER TABLE "public"."post_programme" MODIFY COLUMN "status_icfa" integer COMMENT '2-内控法务部审批-状态:1-待审核;3-通过;4-驳回;';
  392. ALTER TABLE "public"."post_programme" MODIFY COLUMN "date_icfa" timestamp WITH time ZONE COMMENT '2-内控法务部审批-通过日期';
  393. ALTER TABLE "public"."post_programme" MODIFY COLUMN "reason_icfa" CHARACTER VARYING COMMENT '2-内控法务部审批-未通过理由';
  394. ALTER TABLE "public"."post_programme" ADD COLUMN status_time DATETIME NULL COMMENT '审核时间';
  395. ALTER TABLE "public"."post_programme" ADD COLUMN status_user_id bigint NULL COMMENT '审核时人ID';
  396. ALTER TABLE "public"."post_plan" ADD COLUMN status_time DATETIME NULL COMMENT '审核时间';
  397. ALTER TABLE "public"."post_plan" ADD COLUMN status_user_id bigint NULL COMMENT '审核时人ID';
  398. ALTER TABLE "public"."post_programme" ADD COLUMN status_icfa_user_id integer COMMENT '2-内控法务部审批人ID';
  399. ALTER TABLE "public"."post_programme" ADD COLUMN status_hr_user_id integer COMMENT '1-人力资源审批人ID';
  400. ALTER TABLE "public"."post_plan" ADD COLUMN status_icfa_user_id integer COMMENT '1-内控法务部审批人ID';
  401. ALTER TABLE "public"."post_plan" ADD COLUMN status_hr_user_id integer COMMENT '2-人力资源审批人ID';
  402. ALTER TABLE "public"."post_team_dept" RENAME COLUMN "dept_id" TO group_team_name;
  403. ALTER TABLE "public"."post_team_dept" MODIFY COLUMN "group_team_name" varchar;
  404. ALTER TABLE "public"."post_team_dept" MODIFY COLUMN "group_team_name" varchar COMMENT '岗检工作组名称(与部门不相关,自定义的名称,例如:综合岗检工作组、生产岗检工作组)';
  405. ALTER TABLE "public"."post_team_dept" MODIFY COLUMN "type" integer COMMENT '类型(1-牵头;2-成员)';
  406. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "type" integer COMMENT '类型(1-组长;2-成员;)';
  407. CREATE TABLE `post_assessment_rating` (
  408. `id` TINYINT NOT NULL COMMENT '主键',
  409. `type` INT NOT NULL COMMENT '类型:1-职能;2-生产;',
  410. `department_id` VARCHAR(32) NOT NULL COMMENT '部门ID',
  411. `position_name` VARCHAR(64) NOT NULL COMMENT '岗位名称',
  412. `principal_id` VARCHAR(32) NOT NULL COMMENT '负责人ID',
  413. `integrity_issues_total` INT NOT NULL DEFAULT 0 COMMENT '完整性问题数量-总数',
  414. `integrity_issues_resolved` INT NOT NULL DEFAULT 0 COMMENT '完整性问题数量-已整改',
  415. `effectiveness_issues_total` INT NOT NULL DEFAULT 0 COMMENT '有效性问题数量-总数',
  416. `effectiveness_issues_resolved` INT NOT NULL DEFAULT 0 COMMENT '有效性问题数量-已整改',
  417. `suitability_issues_total` INT NOT NULL DEFAULT 0 COMMENT '适宜性问题数量-总数',
  418. `suitability_issues_resolved` INT NOT NULL DEFAULT 0 COMMENT '适宜性问题数量-已整改',
  419. `peer_evaluation_score` DECIMAL(5,2) NOT NULL DEFAULT 0.00 COMMENT '互评得分',
  420. `daily_score` DECIMAL(5,2) NOT NULL DEFAULT 0.00 COMMENT '日常得分',
  421. `department_score` DECIMAL(5,2) NOT NULL DEFAULT 0.00 COMMENT '部门得分',
  422. `position_score` DECIMAL(5,2) NOT NULL DEFAULT 0.00 COMMENT '岗位得分',
  423. `rating_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '评分时间',
  424. `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  425. `del_flag` INT NOT NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)',
  426. `create_time` datetime NOT NULL COMMENT '创建时间',
  427. `create_by` varchar(64) NOT NULL COMMENT '创建者',
  428. `update_time` datetime NOT NULL COMMENT '更新时间',
  429. `update_by` varchar(64) NOT NULL COMMENT '更新者',
  430. PRIMARY KEY (`id`)
  431. ) COMMENT='考核评比表';
  432. ALTER TABLE "public"."post_assessment_rating" RENAME COLUMN "department_id" TO dept_id;
  433. ALTER TABLE "public"."post_assessment_rating" MODIFY COLUMN "dept_id" bigint;
  434. ALTER TABLE "public"."post_assessment_rating" RENAME COLUMN "position_name" TO post_id;
  435. ALTER TABLE "public"."post_assessment_rating" MODIFY COLUMN "post_id" bigint;
  436. ALTER TABLE "public"."post_assessment_rating" RENAME COLUMN "principal_id" TO head_user_id;
  437. ALTER TABLE "public"."post_assessment_rating" MODIFY COLUMN "head_user_id" bigint;
  438. ALTER TABLE "public"."post_team_user" MODIFY COLUMN "post_team_id" bigint;
  439. ALTER TABLE "public"."post_team_dept" COMMENT '(废弃)岗检工作组关联部门';
  440. ALTER TABLE "public"."post_team" ADD COLUMN team_type integer NOT NULL DEFAULT 2 COMMENT 'type=3时,工作小组权限(1-牵头;2-成员)';
  441. ALTER TABLE "public"."post_plan" RENAME COLUMN "check_workgroup_id" TO check_group_id;
  442. ALTER TABLE "public"."post_plan" RENAME COLUMN "check_group_id" TO check_team_id;
  443. ALTER TABLE "public"."post_plan_info" ADD COLUMN status integer COMMENT '岗检状态:1-未检;2-已检;';
  444. ALTER TABLE "public"."post_plan_info" ADD COLUMN print_user_id bigint COMMENT '打印人ID';
  445. ALTER TABLE "public"."post_plan_info" ADD COLUMN print_time DATETIME COMMENT '打印时间';
  446. ALTER TABLE "public"."post_plan_info" ADD COLUMN checked_img varchar COMMENT '上传:检查后的检查表照片或PDF,磁盘相对路径';
  447. ALTER TABLE "public"."post_plan_info" ADD COLUMN checked_user_id bigint COMMENT '上传:检查人ID';
  448. ALTER TABLE "public"."post_plan_info" ADD COLUMN checked_time DATETIME COMMENT '上传:检查时间';
  449. ALTER TABLE "public"."post_checked_problem" ADD COLUMN duty_type integer COMMENT '职责类别:1-业务职责;2-党建及党风廉政;3-安全环保职责;4-合规保密职;';
  450. ALTER TABLE "public"."post_checked_problem_record" DROP COLUMN "create_user_id";
  451. ALTER TABLE "public"."post_checked_problem_record" DROP COLUMN "check_time";
  452. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "problem_level" integer;
  453. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "problem_attribute" integer;
  454. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "problem_category" integer;
  455. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "is_immediately_corrected" integer NULL;
  456. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "checked_dept_id" bigint NULL;
  457. ALTER TABLE "public"."post_checked_problem" MODIFY COLUMN "checked_post_id" bigint NULL;
  458. ALTER TABLE "public"."post_checked_problem_record" DROP COLUMN "remark";
  459. ALTER TABLE "public"."post_checked_problem_record" DROP COLUMN "del_flag";
  460. ALTER TABLE "public"."post_checked_problem_record" DROP COLUMN "create_by";
  461. ALTER TABLE "public"."post_checked_problem_record" DROP COLUMN "update_time";
  462. ALTER TABLE "public"."post_checked_problem_record" DROP COLUMN "update_by";
  463. ALTER TABLE "public"."post_list" RENAME COLUMN "position_name" TO post_id;
  464. ALTER TABLE "public"."post_list" MODIFY COLUMN "post_id" bigint;
  465. ALTER TABLE "public"."post_list" MODIFY COLUMN "post_id" bigint COMMENT '岗位名称:岗位ID';
  466. ALTER TABLE "public"."post_list" RENAME COLUMN "department_name" TO dept_id;
  467. ALTER TABLE "public"."post_list" MODIFY COLUMN "dept_id" bigint;
  468. ALTER TABLE "public"."post_list" MODIFY COLUMN "dept_id" bigint COMMENT '所在部门:部门ID'; deptId
  469. ALTER TABLE "public"."post_highlights" MODIFY COLUMN "highlights_type" integer COMMENT '职责类别:1-业务职责;2-党建及党风廉政;3-安全环保职责;4-合规保密职;5-其他;';
  470. ALTER TABLE "public"."post_checked_report" ADD COLUMN html_one TEXT COMMENT '1、(一)组织情况';
  471. ALTER TABLE "public"."post_checked_report" ADD COLUMN html_two TEXT COMMENT '2、(二)岗检的时间、范围和开展形式';
  472. ALTER TABLE "public"."post_checked_report" ADD COLUMN html_three TEXT COMMENT '3、(三)岗检发现的主要问题';
  473. ALTER TABLE "public"."post_checked_report" ADD COLUMN html_four TEXT COMMENT '4、(四)原因分析';
  474. ALTER TABLE "public"."post_checked_report" ADD COLUMN html_five TEXT COMMENT '5、(五)取得成绩';
  475. ALTER TABLE "public"."post_checked_report" ADD COLUMN html_six TEXT COMMENT '6、(一)“立行立改”问题整改情况';
  476. ALTER TABLE "public"."post_checked_report" ADD COLUMN html_seven TEXT COMMENT '7、(二)“非立行立改”问题整改情况';
  477. ALTER TABLE "public"."post_checked_report" ADD COLUMN html_eight TEXT COMMENT '8、三、下一步岗位责任提升计划';
  478. ALTER TABLE "public"."post_checked_report" ADD COLUMN html_nine TEXT COMMENT '9、四、总结结论';
  479. ALTER TABLE "public"."post_checked_report" ADD COLUMN status integer NOT NULL COMMENT '状态:1-待审核;3-通过;4-驳回;';
  480. ALTER TABLE "public"."post_checked_report" ADD COLUMN status_by_user_id integer COMMENT '审核人ID';
  481. ALTER TABLE "public"."post_checked_report" ADD COLUMN status_by_user_name integer COMMENT '审核人姓名';
  482. ALTER TABLE "public"."post_checked_report" ADD COLUMN status_reason integer COMMENT '审核不通过原因';
  483. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "consummation_problem" integer COMMENT '废弃:完善性问题';
  484. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "suitability_problem" integer COMMENT '废弃:适宜性问题';
  485. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "effectiveness_problem" integer COMMENT '废弃:有效性问题';
  486. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "li_xing_li_gai_question_number" integer COMMENT '废弃:立行立改问题数量';
  487. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "li_xing_li_gai_question_has_rectified_number" integer COMMENT '废弃:立行立改问题已整改数量';
  488. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "rich_text" TEXT COMMENT '废弃:富文本';
  489. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "status_by_user_id" bigint;
  490. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "status_by_user_name" varchar(64);
  491. ALTER TABLE "public"."post_checked_report" MODIFY COLUMN "status_reason" varchar(255);
  492. CREATE TABLE post_assessment_rules (
  493. `id` bigint NOT NULL COMMENT '主键',
  494. type VARCHAR(255) COMMENT '评分分类/项目/专业:1-岗检考核规则;2-职能部门互评表;;3-生产部门日常得分;',
  495. full_score INT COMMENT '满分/权重',
  496. rule VARCHAR(500) COMMENT '考核规则/评分标准',
  497. problem_level_one int COMMENT 'type=1-岗检考核规则:一般',
  498. problem_level_two int COMMENT 'type=1-岗检考核规则:重要',
  499. status int COMMENT '状态:1-待审核;3-通过;4-驳回;',
  500. status_by_user_id INT COMMENT '审核人ID',
  501. status_by_user_name VARCHAR(255) COMMENT '审核人姓名' ,
  502. `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  503. `del_flag` INT NOT NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)',
  504. `create_time` datetime NOT NULL COMMENT '创建时间/提交时间',
  505. `create_by` varchar(64) NOT NULL COMMENT '创建者',
  506. `update_time` datetime NOT NULL COMMENT '更新时间',
  507. `update_by` varchar(64) NOT NULL COMMENT '更新者',
  508. PRIMARY KEY (`id`)
  509. ) COMMENT='考核规则表';
  510. ALTER TABLE "public"."post_assessment_rules" MODIFY COLUMN "type" integer;
  511. ALTER TABLE "public"."post_assessment_rules" MODIFY COLUMN "problem_level_one" decimal(
  512. 5,
  513. 2
  514. );
  515. ALTER TABLE "public"."post_assessment_rules" MODIFY COLUMN "problem_level_one" decimal COMMENT 'type=1-岗检考核规则:一般分数';
  516. ALTER TABLE "public"."post_assessment_rules" MODIFY COLUMN "problem_level_two" decimal(
  517. 5,
  518. 2
  519. );
  520. ALTER TABLE "public"."post_assessment_rules" MODIFY COLUMN "problem_level_two" decimal COMMENT 'type=1-岗检考核规则:重要分数';
  521. ALTER TABLE "public"."post_assessment_rules" MODIFY COLUMN "status_by_user_id" bigint;
  522. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "id" bigint NOT NULL;
  523. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "type" integer NOT NULL;
  524. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "batch_id" varchar NOT NULL;
  525. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "start_time" DATETIME NOT NULL;
  526. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "status" integer NOT NULL;
  527. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "dept_id" bigint NOT NULL;
  528. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "create_user_id" DATETIME NOT NULL;
  529. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "del_flag" DATETIME NOT NULL;
  530. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "create_time" DATETIME NOT NULL;
  531. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "create_by" DATETIME NOT NULL;
  532. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "update_time" DATETIME NOT NULL;
  533. ALTER TABLE "public"."post_assessment_rating_other" MODIFY COLUMN "update_by" DATETIME NOT NULL;
  534. CREATE UNIQUE INDEX post_assessment_rating_other_pkey ON
  535. "public"."post_assessment_rating_other"
  536. USING BTREE (id) TABLESPACE "sys_default";
  537. CREATE TABLE "public"."post_assessment_rating_other" (
  538. "id" bigint NOT NULL,
  539. "type" integer NOT NULL,
  540. "batch_id" varchar NOT NULL,
  541. "start_time" datetime NOT NULL,
  542. "status" integer NOT NULL,
  543. "dept_id" bigint NOT NULL,
  544. "complete_time" datetime NULL,
  545. "score_user_id" bigint NULL,
  546. "score_user_name" varchar NULL,
  547. "create_user_id" bigint NOT NULL,
  548. "remark" character varying(255 char) NULL,
  549. "del_flag" integer NOT NULL,
  550. "create_time" datetime NOT NULL,
  551. "create_by" character varying(64 char) NOT NULL,
  552. "update_time" datetime NOT NULL,
  553. "update_by" character varying(64 char) NOT NULL
  554. );
  555. CREATE UNIQUE INDEX post_assessment_rating_other_pkey ON public.post_assessment_rating_other USING btree (id);
  556. ALTER TABLE "public"."post_assessment_rating_other" COMMENT '打分表(职能互评生产日常)';
  557. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "id" COMMENT '主键';
  558. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "type" COMMENT '类型:1-职能互评;2-生产日常;';
  559. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "batch_id" COMMENT '批次号(管理员创建的)';
  560. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "start_time" COMMENT '评分开始时间(管理员创建的)';
  561. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "status" COMMENT '状态:1-进行中;2-已完成';
  562. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "dept_id" COMMENT '评分部门ID:打分部门,自己给其他12个部门打分;';
  563. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "complete_time" COMMENT '评分完成时间';
  564. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "score_user_id" COMMENT '评分人ID';
  565. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "score_user_name" COMMENT '评分人姓名';
  566. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "create_user_id" COMMENT '创建者用户ID';
  567. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "remark" COMMENT '备注';
  568. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "del_flag" COMMENT '删除标志(0代表存在 2代表删除)';
  569. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "create_time" COMMENT '创建时间/提交时间';
  570. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "create_by" COMMENT '创建者';
  571. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "update_time" COMMENT '更新时间';
  572. ALTER TABLE "public"."post_assessment_rating_other" MODIFY "update_by" COMMENT '更新者';
  573. CREATE TABLE "public"."post_assessment_rating_other_info" (
  574. "id" bigint NOT NULL,
  575. "rating_other_id" bigint NOT NULL,
  576. "duty_type" integer NOT NULL,
  577. "score_weight" numeric(10,0) NOT NULL,
  578. "rule" character varying(512 char) NULL,
  579. "by_dept_id" bigint NOT NULL,
  580. "by_dept_score" numeric(5,2) NULL,
  581. "improvement_suggestions" character varying(512 char) NULL,
  582. "create_user_id" bigint NULL,
  583. "remark" character varying(255 char) NULL,
  584. "del_flag" integer NULL,
  585. "create_time" datetime NULL,
  586. "create_by" character varying(64 char) NULL,
  587. "update_time" datetime NULL,
  588. "update_by" character varying(64 char) NULL
  589. );
  590. CREATE UNIQUE INDEX post_assessment_rating_other_info_pkey ON public.post_assessment_rating_other_info USING btree (id);
  591. ALTER TABLE "public"."post_assessment_rating_other_info" COMMENT '打分表明细(职能互评生产日常)';
  592. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "id" COMMENT '主键';
  593. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "rating_other_id" COMMENT '打分表ID';
  594. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "duty_type" COMMENT '评分分类/项目/专业:职责类别:1-业务职责;2-党建及党风廉政;3-安全环保职责;4-合规与保密职责;5-任职资格与能力素质要求;6-岗位责任制文件完整性与适宜性;10-工作态度;11-部门协作;12-廉洁从业;13-主要工作完成情况;20-HSE;21-生产;22-设备;';
  595. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "score_weight" COMMENT '分值/权重;(当前考核规则的分和权重镜像到这里)';
  596. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "rule" COMMENT '考核规则/评分标准(岗检和职能部门时有值)';
  597. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "by_dept_id" COMMENT '被评分部门ID';
  598. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "by_dept_score" COMMENT '被评分部门得分';
  599. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "improvement_suggestions" COMMENT '改进建议';
  600. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "create_user_id" COMMENT '创建者用户ID';
  601. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "remark" COMMENT '备注';
  602. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "del_flag" COMMENT '删除标志(0代表存在 2代表删除)';
  603. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "create_time" COMMENT '创建时间/提交时间';
  604. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "create_by" COMMENT '创建者';
  605. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "update_time" COMMENT '更新时间';
  606. ALTER TABLE "public"."post_assessment_rating_other_info" MODIFY "update_by" COMMENT '更新者';
  607. 添加通用字段
  608. ALTER TABLE "public"."post_assessment_rating_other" ADD COLUMN create_user_id bigint NULL COMMENT '创建者用户ID';
  609. ALTER TABLE "public"."post_assessment_rating_other" ADD COLUMN remark varying(255 char) NULL COMMENT '备注';
  610. ALTER TABLE "public"."post_assessment_rating_other" ADD COLUMN del_flag integer NULL COMMENT '删除标志(0代表存在 2代表删除)';
  611. ALTER TABLE "public"."post_assessment_rating_other" ADD COLUMN create_time DATETIME NULL COMMENT '创建时间/提交时间';
  612. ALTER TABLE "public"."post_assessment_rating_other" ADD COLUMN create_by varying(64 char) NULL COMMENT '创建者';
  613. ALTER TABLE "public"."post_assessment_rating_other" ADD COLUMN update_time DATETIME NULL COMMENT '更新时间';
  614. ALTER TABLE "public"."post_assessment_rating_other" ADD COLUMN update_by varying(64 char) NULL COMMENT '更新者';
  615. ALTER TABLE "public"."post_checked" RENAME COLUMN "checked_user_id" TO checked_user_name;
  616. ALTER TABLE "public"."post_checked" MODIFY COLUMN "checked_user_name" varchar(64);
  617. ALTER TABLE "public"."post_checked" MODIFY COLUMN "checked_user_name" varchar COMMENT '检查人中文姓名(上传页面设置的值)';
  618. ALTER TABLE "public"."post_checked" MODIFY COLUMN "checked_time" timestamp WITH time ZONE COMMENT '检查时间(上传页面设置的值)';
  619. ALTER TABLE "public"."post_checked" MODIFY COLUMN "upload_user_id" bigint COMMENT '检查表上传人ID';
  620. ALTER TABLE "public"."post_checked" MODIFY COLUMN "upload_time" timestamp WITH time ZONE COMMENT '检查表上传时间';
  621. ALTER TABLE "public"."post_checked_items" MODIFY COLUMN "type" integer COMMENT '检查项目:参考post_list_info表;类型(1-业务职责;2-党建及党风廉政建设职责;3-安全环保职责;4-合规保密职;5-任职资格与能力素质要求)';
  622. ALTER TABLE "public"."post_checked_items" ADD COLUMN post_checked_content varchar(1000) COMMENT '检查内容';
  623. ALTER TABLE "public"."post_checked_items" ADD COLUMN post_checked_standard varchar(1000) COMMENT '检查标准';
  624. ALTER TABLE "public"."post_checked_items" ADD COLUMN post_checked_method varchar(1000) COMMENT '检查方法';
  625. ALTER TABLE "public"."post_checked_items" ADD COLUMN post_checked_result varchar(1000) COMMENT '检查结果';