-- created by Oraschemadoc Fri Jun 13 14:05:52 2008
-- visit http://www.yarpen.cz/oraschemadoc/ for more info

  CREATE TABLE "RHNSAT"."RHNKICKSTARTSCRIPT" 
   (	"ID" NUMBER CONSTRAINT "RHN_KSSCRIPT_ID_NN" NOT NULL ENABLE, 
	"KICKSTART_ID" NUMBER CONSTRAINT "RHN_KSSCRIPT_KSID_NN" NOT NULL ENABLE, 
	"POSITION" NUMBER CONSTRAINT "RHN_KSSCRIPT_POS_NN" NOT NULL ENABLE, 
	"SCRIPT_TYPE" VARCHAR2(4) CONSTRAINT "RHN_KSSCRIPT_ST_NN" NOT NULL ENABLE, 
	"CHROOT" CHAR(1) DEFAULT ('Y') CONSTRAINT "RHN_KSSCRIPT_CHROOT_NN" NOT NULL ENABLE, 
	"INTERPRETER" VARCHAR2(80), 
	"DATA" BLOB, 
	"CREATED" DATE DEFAULT (sysdate) CONSTRAINT "RHN_KSSCRIPT_CREAT_NN" NOT NULL ENABLE, 
	"MODIFIED" DATE DEFAULT (sysdate) CONSTRAINT "RHN_KSSCRIPT_MOD_NN" NOT NULL ENABLE, 
	 CONSTRAINT "RHN_KSSCRIPT_ST_CK" CHECK (script_type in ('pre','post')) ENABLE, 
	 CONSTRAINT "RHN_KSSCRIPT_CHROOT_CK" CHECK (chroot in ('Y','N')) ENABLE, 
	 CONSTRAINT "RHN_KSSCRIPT_ID_PK" PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 32 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 16 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "DATA_TBS"  ENABLE, 
	 CONSTRAINT "RHN_KSSCRIPT_KSID_POS_UQ" UNIQUE ("KICKSTART_ID", "POSITION")
  USING INDEX PCTFREE 10 INITRANS 32 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 16 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "DATA_TBS"  ENABLE, 
	 CONSTRAINT "RHN_KSSCRIPT_KSID_FK" FOREIGN KEY ("KICKSTART_ID")
	  REFERENCES "RHNSAT"."RHNKSDATA" ("ID") ON DELETE CASCADE ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 32 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 16 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "DATA_TBS" 
 LOB ("DATA") STORE AS (
  TABLESPACE "DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
  NOCACHE LOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) 
 
/
