You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
4.3 KiB

8 months ago
  1. --------------------------------------------------------
  2. -- DDL for Table HIS_TASK_MST
  3. --------------------------------------------------------
  4. CREATE TABLE "MIRLE"."HIS_TASK_MST"
  5. (
  6. "CMD_SNO" VARCHAR2(20 CHAR),
  7. "TASK_ID" VARCHAR2(16 CHAR),
  8. "CMD_ID" VARCHAR2(6 CHAR),
  9. "TASK_STATUS" NUMBER(1,0),
  10. "TASK_MODE" NUMBER(2,0),
  11. "TASK_SEQ" NUMBER(3,0),
  12. "PRIORITY" NUMBER(1,0),
  13. "SOURCE_POSITION" VARCHAR2(9 CHAR),
  14. "DEST_POSITION" VARCHAR2(9 CHAR),
  15. "CARRIER_ID" VARCHAR2(64 CHAR),
  16. "SOFTWARE_ID" VARCHAR2(7 CHAR),
  17. "VEHICLE_ID" VARCHAR2(16 CHAR),
  18. "CREATE_TIME" TIMESTAMP (6),
  19. "SEND_TIME" TIMESTAMP (6),
  20. "START_TIME" TIMESTAMP (6),
  21. "END_TIME" TIMESTAMP (6),
  22. "FAILED_REASON" VARCHAR2(255 CHAR),
  23. "PROGRAM_NAME" VARCHAR2(30 CHAR),
  24. "HISTORY_TIME" TIMESTAMP (6) DEFAULT systimestamp
  25. )
  26. SEGMENT CREATION IMMEDIATE
  27. PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
  28. NOCOMPRESS LOGGING
  29. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  30. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  31. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  32. TABLESPACE "SYSTEM" ;
  33. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."CMD_SNO" IS '命令序號';
  34. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."TASK_ID" IS '任務編號';
  35. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."CMD_ID" IS '命令編號';
  36. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."TASK_STATUS" IS '任務狀態';
  37. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."TASK_MODE" IS '任務模式';
  38. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."TASK_SEQ" IS '任務流水號';
  39. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."PRIORITY" IS '任務優先權';
  40. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."SOURCE_POSITION" IS '起始位置';
  41. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."DEST_POSITION" IS '目的位置';
  42. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."CARRIER_ID" IS '載具編號';
  43. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."SOFTWARE_ID" IS '軟體編號';
  44. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."VEHICLE_ID" IS '設備編號';
  45. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."CREATE_TIME" IS '建立時間';
  46. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."SEND_TIME" IS '傳送時間';
  47. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."START_TIME" IS '起始時間';
  48. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."END_TIME" IS '結束時間';
  49. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."FAILED_REASON" IS '失敗原因';
  50. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."PROGRAM_NAME" IS '程式名稱';
  51. COMMENT ON COLUMN "MIRLE"."HIS_TASK_MST"."HISTORY_TIME" IS '寫入時間';
  52. --------------------------------------------------------
  53. -- DDL for Index HIS_TASK_MST_PK
  54. --------------------------------------------------------
  55. CREATE UNIQUE INDEX "MIRLE"."HIS_TASK_MST_PK" ON "MIRLE"."HIS_TASK_MST" ("CMD_SNO", "TASK_ID")
  56. PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  57. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  58. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  59. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  60. TABLESPACE "SYSTEM" ;
  61. --------------------------------------------------------
  62. -- Constraints for Table HIS_TASK_MST
  63. --------------------------------------------------------
  64. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("TASK_SEQ" NOT NULL ENABLE);
  65. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("HISTORY_TIME" NOT NULL ENABLE);
  66. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("CMD_SNO" NOT NULL ENABLE);
  67. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("TASK_ID" NOT NULL ENABLE);
  68. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("CMD_ID" NOT NULL ENABLE);
  69. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("TASK_STATUS" NOT NULL ENABLE);
  70. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("TASK_MODE" NOT NULL ENABLE);
  71. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("PRIORITY" NOT NULL ENABLE);
  72. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("SOURCE_POSITION" NOT NULL ENABLE);
  73. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("DEST_POSITION" NOT NULL ENABLE);
  74. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("SOFTWARE_ID" NOT NULL ENABLE);
  75. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("CREATE_TIME" NOT NULL ENABLE);
  76. ALTER TABLE "MIRLE"."HIS_TASK_MST" MODIFY ("PROGRAM_NAME" NOT NULL ENABLE);
  77. ALTER TABLE "MIRLE"."HIS_TASK_MST" ADD CONSTRAINT "HIS_TASK_MST_PK" PRIMARY KEY ("CMD_SNO", "TASK_ID")
  78. USING INDEX "MIRLE"."HIS_TASK_MST_PK" ENABLE;