2019-06-28.sql 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. -- Create table
  2. create table STD_ENROL_LOG
  3. (
  4. id NUMBER(10) not null,
  5. std_reg_id NUMBER(10),
  6. year_code NUMBER(6),
  7. std_enrol_id NUMBER(10),
  8. enrol_type NUMBER(2),
  9. content VARCHAR2(1000),
  10. operator VARCHAR2(100),
  11. oper_time DATE,
  12. oper_type NUMBER(10)
  13. )
  14. tablespace USERS
  15. pctfree 10
  16. initrans 1
  17. maxtrans 255
  18. storage
  19. (
  20. initial 64K
  21. next 1M
  22. minextents 1
  23. maxextents unlimited
  24. );
  25. -- Add comments to the table
  26. comment on table STD_ENROL_LOG
  27. is '考生报考日志表';
  28. -- Add comments to the columns
  29. comment on column STD_ENROL_LOG.id
  30. is '编号';
  31. comment on column STD_ENROL_LOG.std_reg_id
  32. is '考生ID 和考生表关联';
  33. comment on column STD_ENROL_LOG.year_code
  34. is '批次码 6位批次码,如:201910';
  35. comment on column STD_ENROL_LOG.std_enrol_id
  36. is '报考ID 和std_enrol表关联';
  37. comment on column STD_ENROL_LOG.enrol_type
  38. is '报考类型 1:个人报考;2:集体报考';
  39. comment on column STD_ENROL_LOG.content
  40. is '操作内容';
  41. comment on column STD_ENROL_LOG.operator
  42. is '操作人 登录名+姓名';
  43. comment on column STD_ENROL_LOG.oper_time
  44. is '操作时间 精确到时分秒';
  45. comment on column STD_ENROL_LOG.oper_type
  46. is '操作类型 0:新增:1:修改:2:删除';
  47. -- Create/Recreate primary, unique and foreign key constraints
  48. alter table STD_ENROL_LOG
  49. add constraint PK_STD_ENROL_LOG_ID primary key (ID)
  50. using index
  51. tablespace USERS
  52. pctfree 10
  53. initrans 2
  54. maxtrans 255
  55. storage
  56. (
  57. initial 64K
  58. next 1M
  59. minextents 1
  60. maxextents unlimited
  61. );
  62. create sequence SEQ_std_enrol_log;
  63. alter table PL_MAJOR_APPLY modify file_path VARCHAR2(256);
  64. alter table PL_MAJOR_APPLY modify file_name VARCHAR2(128);
  65. -- Add/modify columns
  66. alter table PL_MAJOR_APPLY_JOIN_SCHOOL add major_id NUMBER(10);
  67. -- Add comments to the columns
  68. comment on column PL_MAJOR_APPLY_JOIN_SCHOOL.major_id
  69. is '专业ID';
  70. -- Add/modify columns
  71. alter table CF_ORGANIZATION add status NUMBER(1);
  72. -- Add comments to the columns
  73. comment on column CF_ORGANIZATION.status
  74. is '0-禁用,1-启用';
  75. alter table pl_major_record add apply_form NUMBER(1);
  76. -- Add comments to the columns
  77. comment on column pl_major_record.apply_form
  78. is '申报形式';
  79. drop table BY_TIME_CONFIG;
  80. drop sequence SEQ_BY_TIME_CONFIG;
  81. create sequence SEQ_BY_TIME_CONFIG;
  82. -- Create table
  83. create table BY_TIME_CONFIG
  84. (
  85. id NUMBER(10) not null,
  86. exam_time_id NUMBER(10),
  87. by_date DATE,
  88. apply_start_time DATE,
  89. apply_end_time DATE,
  90. confirm_start_time DATE,
  91. confirm_end_time DATE,
  92. sch_chk_start_time DATE,
  93. sch_chk_end_time DATE,
  94. student_type NUMBER(1),
  95. status NUMBER(1),
  96. remark VARCHAR2(150)
  97. )
  98. tablespace USERS
  99. pctfree 10
  100. initrans 1
  101. maxtrans 255
  102. storage
  103. (
  104. initial 64K
  105. next 1M
  106. minextents 1
  107. maxextents unlimited
  108. );
  109. -- Add comments to the table
  110. comment on table BY_TIME_CONFIG
  111. is '毕业时间配置表';
  112. -- Add comments to the columns
  113. comment on column BY_TIME_CONFIG.id
  114. is '主键';
  115. comment on column BY_TIME_CONFIG.exam_time_id
  116. is '时间配置ID';
  117. comment on column BY_TIME_CONFIG.by_date
  118. is '毕业日期';
  119. comment on column BY_TIME_CONFIG.apply_start_time
  120. is '申请开始时间';
  121. comment on column BY_TIME_CONFIG.apply_end_time
  122. is '申请结束时间';
  123. comment on column BY_TIME_CONFIG.confirm_start_time
  124. is '确认开始时间';
  125. comment on column BY_TIME_CONFIG.confirm_end_time
  126. is '确认结束时间';
  127. comment on column BY_TIME_CONFIG.sch_chk_start_time
  128. is '主考学校审核开始时间';
  129. comment on column BY_TIME_CONFIG.sch_chk_end_time
  130. is '主考学校审核结束时间';
  131. comment on column BY_TIME_CONFIG.student_type
  132. is '考生类型';
  133. comment on column BY_TIME_CONFIG.status
  134. is '状态';
  135. comment on column BY_TIME_CONFIG.remark
  136. is '备注';
  137. -- Create/Recreate primary, unique and foreign key constraints
  138. alter table BY_TIME_CONFIG
  139. add constraint PK_BY_TIME_CONFIG_ID primary key (ID)
  140. using index
  141. tablespace USERS
  142. pctfree 10
  143. initrans 2
  144. maxtrans 255
  145. storage
  146. (
  147. initial 64K
  148. next 1M
  149. minextents 1
  150. maxextents unlimited
  151. );
  152. alter table pl_major_apply add IS_AUTH_BACK NUMBER(1);
  153. -- Add comments to the columns
  154. comment on column pl_major_apply.IS_AUTH_BACK
  155. is '是否退回';
  156. alter table pl_major_apply_detail add major_id NUMBER(10);
  157. -- Add comments to the columns
  158. comment on column pl_major_apply_detail.major_id
  159. is '专业ID';
  160. drop table BY_BLACK_LIST;
  161. drop sequense SEQ_BY_BLACK_LIST;
  162. create sequense SEQ_BY_BLACK_LIST;
  163. -- Create table
  164. create table BY_BLACK_LIST
  165. (
  166. id NUMBER(10) not null,
  167. std_id NUMBER(10),
  168. std_name VARCHAR2(30),
  169. ticket_no VARCHAR2(15),
  170. cert_no VARCHAR2(18),
  171. start_date DATE,
  172. end_date DATE,
  173. course_id NUMBER(10),
  174. exam_date DATE,
  175. remark VARCHAR2(150),
  176. status NUMBER(10)
  177. )
  178. tablespace USERS
  179. pctfree 10
  180. initrans 1
  181. maxtrans 255;
  182. -- Add comments to the table
  183. comment on table BY_BLACK_LIST
  184. is '毕业黑名单';
  185. -- Add comments to the columns
  186. comment on column BY_BLACK_LIST.id
  187. is '主键';
  188. comment on column BY_BLACK_LIST.std_id
  189. is '学生ID';
  190. comment on column BY_BLACK_LIST.std_name
  191. is '学生姓名';
  192. comment on column BY_BLACK_LIST.ticket_no
  193. is '准考证号码';
  194. comment on column BY_BLACK_LIST.cert_no
  195. is '身份证号';
  196. comment on column BY_BLACK_LIST.start_date
  197. is '限制开始日期';
  198. comment on column BY_BLACK_LIST.end_date
  199. is '限制结束日期';
  200. comment on column BY_BLACK_LIST.course_id
  201. is '问题课程ID';
  202. comment on column BY_BLACK_LIST.exam_date
  203. is '考试日期';
  204. comment on column BY_BLACK_LIST.remark
  205. is '备注';
  206. comment on column BY_BLACK_LIST.status
  207. is '状态 状态,0-停办、1-解禁';
  208. -- Create/Recreate primary, unique and foreign key constraints
  209. alter table BY_BLACK_LIST
  210. add constraint PK_BY_BLACK_LIST_ID primary key (ID)
  211. using index
  212. tablespace USERS
  213. pctfree 10
  214. initrans 2
  215. maxtrans 255;
  216. drop table BY_PAPER;
  217. drop sequense SEQ_BY_PAPER;
  218. create sequense SEQ_BY_PAPER;
  219. -- Create table
  220. create table BY_PAPER
  221. (
  222. id NUMBER(10) not null,
  223. major_id NUMBER(10),
  224. std_reg_id NUMBER(10),
  225. paper_title VARCHAR2(100),
  226. paper_score NUMBER(2),
  227. apply_school NUMBER(10),
  228. auth_time DATE,
  229. submit_time DATE,
  230. auth_status NUMBER(2)
  231. )
  232. tablespace USERS
  233. pctfree 10
  234. initrans 1
  235. maxtrans 255
  236. storage
  237. (
  238. initial 64K
  239. next 1M
  240. minextents 1
  241. maxextents unlimited
  242. );
  243. -- Add comments to the table
  244. comment on table BY_PAPER
  245. is '毕业论文';
  246. -- Add comments to the columns
  247. comment on column BY_PAPER.id
  248. is '主键';
  249. comment on column BY_PAPER.major_id
  250. is '专业ID';
  251. comment on column BY_PAPER.std_reg_id
  252. is '考生ID';
  253. comment on column BY_PAPER.paper_title
  254. is '论文标题';
  255. comment on column BY_PAPER.paper_score
  256. is '论文成绩 0-不及格,1-及格,2-中等,3-良好,4-优秀';
  257. comment on column BY_PAPER.apply_school
  258. is '上报学校';
  259. comment on column BY_PAPER.auth_time
  260. is '审核时间';
  261. comment on column BY_PAPER.submit_time
  262. is '提交审核时间';
  263. comment on column BY_PAPER.auth_status
  264. is '审核状态 0-待审核,1-审核通过';
  265. -- Create/Recreate primary, unique and foreign key constraints
  266. alter table BY_PAPER
  267. add constraint PK_BY_PAPER_ID primary key (ID)
  268. using index
  269. tablespace USERS
  270. pctfree 10
  271. initrans 2
  272. maxtrans 255
  273. storage
  274. (
  275. initial 64K
  276. next 1M
  277. minextents 1
  278. maxextents unlimited
  279. );
  280. drop table BY_APPLY_AUDIT;
  281. drop sequense SEQ_BY_APPLY_AUDIT;
  282. create sequense SEQ_BY_APPLY_AUDIT;
  283. -- Create table
  284. create table BY_APPLY_AUDIT
  285. (
  286. id NUMBER(10) not null,
  287. apply_id NUMBER(10),
  288. user_id NUMBER(10),
  289. auth_time DATE,
  290. auth_remark VARCHAR2(150),
  291. auth_type NUMBER(1),
  292. auth_role NUMBER(1)
  293. )
  294. tablespace USERS
  295. pctfree 10
  296. initrans 1
  297. maxtrans 255
  298. storage
  299. (
  300. initial 64K
  301. next 1M
  302. minextents 1
  303. maxextents unlimited
  304. );
  305. -- Add comments to the table
  306. comment on table BY_APPLY_AUDIT
  307. is '毕业审核表';
  308. -- Add comments to the columns
  309. comment on column BY_APPLY_AUDIT.id
  310. is '主键';
  311. comment on column BY_APPLY_AUDIT.apply_id
  312. is '毕业申请ID';
  313. comment on column BY_APPLY_AUDIT.user_id
  314. is '审核用户ID';
  315. comment on column BY_APPLY_AUDIT.auth_time
  316. is '审核时间';
  317. comment on column BY_APPLY_AUDIT.auth_remark
  318. is '审核备注';
  319. comment on column BY_APPLY_AUDIT.auth_type
  320. is '审核类型 审核类型,0-审核通过,1-审核驳回';
  321. comment on column BY_APPLY_AUDIT.auth_role
  322. is '0-省考试院,1-主考学校,2-市考试院';
  323. -- Create/Recreate primary, unique and foreign key constraints
  324. alter table BY_APPLY_AUDIT
  325. add constraint PK_BY_APPLY_AUDIT_ID primary key (ID)
  326. using index
  327. tablespace USERS
  328. pctfree 10
  329. initrans 2
  330. maxtrans 255
  331. storage
  332. (
  333. initial 64K
  334. next 1M
  335. minextents 1
  336. maxextents unlimited
  337. );
  338. drop table BY_DIAPLMA;
  339. drop sequense SEQ_BY_DIAPLMA;
  340. create sequense SEQ_BY_DIAPLMA;
  341. -- Create table
  342. create table BY_DIAPLMA
  343. (
  344. id NUMBER(10) not null,
  345. apply_id NUMBER(10),
  346. by_time_config_id NUMBER(10),
  347. diaplma_no VARCHAR2(30),
  348. std_id NUMBER(10),
  349. ticket_no VARCHAR2(15),
  350. is_dist NUMBER(1)
  351. )
  352. tablespace USERS
  353. pctfree 10
  354. initrans 1
  355. maxtrans 255
  356. storage
  357. (
  358. initial 64K
  359. next 1M
  360. minextents 1
  361. maxextents unlimited
  362. );
  363. -- Add comments to the table
  364. comment on table BY_DIAPLMA
  365. is '毕业证书表';
  366. -- Add comments to the columns
  367. comment on column BY_DIAPLMA.id
  368. is '主键';
  369. comment on column BY_DIAPLMA.apply_id
  370. is '毕业ID';
  371. comment on column BY_DIAPLMA.by_time_config_id
  372. is '毕业时间ID';
  373. comment on column BY_DIAPLMA.diaplma_no
  374. is '毕业证书号';
  375. comment on column BY_DIAPLMA.std_id
  376. is '学生ID';
  377. comment on column BY_DIAPLMA.ticket_no
  378. is '准考证号';
  379. comment on column BY_DIAPLMA.is_dist
  380. is '是否发放';
  381. -- Create/Recreate primary, unique and foreign key constraints
  382. alter table BY_DIAPLMA
  383. add constraint PK_BY_DIAPLMA_ID primary key (ID)
  384. using index
  385. tablespace USERS
  386. pctfree 10
  387. initrans 2
  388. maxtrans 255
  389. storage
  390. (
  391. initial 64K
  392. next 1M
  393. minextents 1
  394. maxextents unlimited
  395. );
  396. alter table kw_layout add UNIFIED_FLAG NUMBER(1);
  397. -- Add comments to the columns
  398. comment on column kw_layout.UNIFIED_FLAG
  399. is '是否统考编排';
  400. -- Add/modify columns
  401. alter table KW_LAYOUT_ROOM add exam_addr varchar2(50);
  402. -- Add comments to the table
  403. comment on table KW_LAYOUT_ROOM
  404. is '编排考场';
  405. comment on column KW_LAYOUT_ROOM.EXAM_ADDR
  406. is '考场编排地址';