﻿--------------------------------------------------------
--  DDL for Table CFG_SYSTEM_SETTING
--------------------------------------------------------

  CREATE TABLE "MIRLE"."CFG_SYSTEM_SETTING" 
  (	
	   "CFG_KEY" VARCHAR2(100 BYTE), 
	   "CFG_VALUE" VARCHAR2(100 BYTE), 
	   "FUNC_ID" NUMBER, 
	   "CFG_NAME" VARCHAR2(100 BYTE)
  ) 
  SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
  NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM" ;

  COMMENT ON COLUMN "MIRLE"."CFG_SYSTEM_SETTING"."CFG_KEY" IS '系統設定識別碼';
  COMMENT ON COLUMN "MIRLE"."CFG_SYSTEM_SETTING"."CFG_VALUE" IS '系統設定值';
  COMMENT ON COLUMN "MIRLE"."CFG_SYSTEM_SETTING"."FUNC_ID" IS '功能編號';
  COMMENT ON COLUMN "MIRLE"."CFG_SYSTEM_SETTING"."CFG_NAME" IS '系統設定名稱';

--------------------------------------------------------
--  DDL for Index CFG_SYSTEM_SETTING_PK2
--------------------------------------------------------

  CREATE UNIQUE INDEX "MIRLE"."CFG_SYSTEM_SETTING_PK2" ON "MIRLE"."CFG_SYSTEM_SETTING" ("CFG_KEY", "FUNC_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM" ;

--------------------------------------------------------
--  Constraints for Table CFG_SYSTEM_SETTING
--------------------------------------------------------

  ALTER TABLE "MIRLE"."CFG_SYSTEM_SETTING" MODIFY ("CFG_VALUE" NOT NULL ENABLE);
  ALTER TABLE "MIRLE"."CFG_SYSTEM_SETTING" MODIFY ("FUNC_ID" NOT NULL ENABLE);
  ALTER TABLE "MIRLE"."CFG_SYSTEM_SETTING" ADD CONSTRAINT "CFG_SYSTEM_SETTING_PK2" PRIMARY KEY ("CFG_KEY", "FUNC_ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM" ENABLE;