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

  CREATE TABLE "RHNSAT"."RHNREGTOKEN" 
   (	"ID" NUMBER CONSTRAINT "RHN_REG_TOKEN_ID_NN" NOT NULL ENABLE, 
	"ORG_ID" NUMBER CONSTRAINT "RHN_REG_TOKEN_OID_NN" NOT NULL ENABLE, 
	"USER_ID" NUMBER, 
	"SERVER_ID" NUMBER, 
	"NOTE" VARCHAR2(2048) CONSTRAINT "RHN_REG_TOKEN_NOTE_NN" NOT NULL ENABLE, 
	"USAGE_LIMIT" NUMBER DEFAULT 0, 
	"DISABLED" NUMBER DEFAULT 0 CONSTRAINT "RHN_REG_TOKEN_DEF_NN" NOT NULL ENABLE, 
	"DEPLOY_CONFIGS" CHAR(1) DEFAULT ('Y') CONSTRAINT "RHN_REG_TOKEN_DEPLOYCONFS_NN" NOT NULL ENABLE, 
	 CONSTRAINT "RHN_REG_TOKEN_DEPLOYCONFS_CK" CHECK (deploy_configs in ('Y','N')) ENABLE, 
	 CONSTRAINT "RHN_REG_TOKEN_PK" PRIMARY KEY ("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)
  TABLESPACE "DATA_TBS"  ENABLE, 
	 CONSTRAINT "RHN_REG_TOKEN_OID_FK" FOREIGN KEY ("ORG_ID")
	  REFERENCES "RHNSAT"."WEB_CUSTOMER" ("ID") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "RHN_REG_TOKEN_UID_FK" FOREIGN KEY ("USER_ID")
	  REFERENCES "RHNSAT"."WEB_CONTACT" ("ID") ON DELETE SET NULL ENABLE, 
	 CONSTRAINT "RHN_REG_TOKEN_SID_FK" FOREIGN KEY ("SERVER_ID")
	  REFERENCES "RHNSAT"."RHNSERVER" ("ID") 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" 
 
/
