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.

85 lines
4.2 KiB

8 months ago
  1. --------------------------------------------------------
  2. -- DDL for Table CFG_LOC
  3. --------------------------------------------------------
  4. CREATE TABLE "MIRLE"."CFG_LOC"
  5. (
  6. "STORAGE_ID" VARCHAR2(7 CHAR),
  7. "LOC_ID" VARCHAR2(9 CHAR),
  8. "PRODUCT_TYPE" VARCHAR2(10 CHAR),
  9. "ROW_X" VARCHAR2(3 CHAR),
  10. "BAY_Y" VARCHAR2(3 CHAR),
  11. "LEVEL_Z" VARCHAR2(3 CHAR),
  12. "LOC_SIZE" VARCHAR2(1 CHAR) DEFAULT 'G',
  13. "LOC_WEIGHT" NUMBER(5,0),
  14. "LOC_HEIGHT" NUMBER(5,0),
  15. "LOC_DEPTH" NUMBER(5,0),
  16. "LOC_LOADING" NUMBER(6,0),
  17. "REMARKS" VARCHAR2(255 CHAR),
  18. "AXIS_X" NUMBER(6,2) DEFAULT 0.0,
  19. "AXIS_Y" NUMBER(6,2) DEFAULT 0.0,
  20. "CREATE_USER" VARCHAR2(30 CHAR),
  21. "CREATE_TIME" TIMESTAMP (6) DEFAULT systimestamp,
  22. "UPDATE_USER" VARCHAR2(30 CHAR),
  23. "UPDATE_TIME" TIMESTAMP (6) DEFAULT systimestamp,
  24. "STATUS" NUMBER(1,0) DEFAULT 0,
  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"."CFG_LOC"."STORAGE_ID" IS '儲存區編號';
  34. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."LOC_ID" IS '儲位編號';
  35. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."PRODUCT_TYPE" IS '存放的產品類別';
  36. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."ROW_X" IS '';
  37. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."BAY_Y" IS '';
  38. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."LEVEL_Z" IS '';
  39. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."LOC_SIZE" IS '儲位尺寸';
  40. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."LOC_WEIGHT" IS '儲位寬度(m)';
  41. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."LOC_HEIGHT" IS '儲位高度(m)';
  42. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."LOC_DEPTH" IS '儲位深度(m)';
  43. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."LOC_LOADING" IS '儲位可乘載重量(kg)';
  44. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."REMARKS" IS '備註';
  45. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."AXIS_X" IS '圖座標 X';
  46. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."AXIS_Y" IS '圖座標 Y';
  47. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."CREATE_USER" IS '建立人員';
  48. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."CREATE_TIME" IS '建立時間';
  49. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."UPDATE_USER" IS '更新人員';
  50. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."UPDATE_TIME" IS '更新時間';
  51. COMMENT ON COLUMN "MIRLE"."CFG_LOC"."STATUS" IS '資料狀態';
  52. --------------------------------------------------------
  53. -- DDL for Index CFG_LOC_PK
  54. --------------------------------------------------------
  55. CREATE UNIQUE INDEX "MIRLE"."CFG_LOC_PK" ON "MIRLE"."CFG_LOC" ("STORAGE_ID", "LOC_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 CFG_LOC
  63. --------------------------------------------------------
  64. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("STORAGE_ID" NOT NULL ENABLE);
  65. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("LOC_ID" NOT NULL ENABLE);
  66. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("PRODUCT_TYPE" NOT NULL ENABLE);
  67. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("ROW_X" NOT NULL ENABLE);
  68. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("BAY_Y" NOT NULL ENABLE);
  69. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("LEVEL_Z" NOT NULL ENABLE);
  70. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("CREATE_USER" NOT NULL ENABLE);
  71. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("CREATE_TIME" NOT NULL ENABLE);
  72. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("UPDATE_USER" NOT NULL ENABLE);
  73. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("UPDATE_TIME" NOT NULL ENABLE);
  74. ALTER TABLE "MIRLE"."CFG_LOC" MODIFY ("STATUS" NOT NULL ENABLE);
  75. ALTER TABLE "MIRLE"."CFG_LOC" ADD CONSTRAINT "CFG_LOC_PK" PRIMARY KEY ("STORAGE_ID", "LOC_ID")
  76. USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  77. STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  78. PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  79. BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  80. TABLESPACE "SYSTEM" ENABLE;