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

  CREATE TABLE "RHNSAT"."RHNSAVEDSEARCH" 
   (	"ID" NUMBER CONSTRAINT "RHN_SAVEDSEARCH_ID_NN" NOT NULL ENABLE, 
	"WEB_CONTACT_ID" NUMBER CONSTRAINT "RHN_SAVEDSEARCH_WCID_NN" NOT NULL ENABLE, 
	"NAME" VARCHAR2(16) CONSTRAINT "RHN_SAVEDSEARCH_NAME_NN" NOT NULL ENABLE, 
	"TYPE" NUMBER CONSTRAINT "RHN_SAVEDSEARCH_TYPE_NN" NOT NULL ENABLE, 
	"SEARCH_STRING" VARCHAR2(4000) CONSTRAINT "RHN_SAVEDSEARCH_SSTRING_NN" NOT NULL ENABLE, 
	"SEARCH_SET" VARCHAR2(16) CONSTRAINT "RHN_SAVEDSEARCH_SSET_NN" NOT NULL ENABLE, 
	"SEARCH_FIELD" VARCHAR2(128) CONSTRAINT "RHN_SAVEDSEARCH_SFIELD_NN" NOT NULL ENABLE, 
	"INVERT" CHAR(1) DEFAULT ('N') CONSTRAINT "RHN_SAVEDSEARCH_INVERT_NN" NOT NULL ENABLE, 
	 CONSTRAINT "RHN_SAVEDSEARCH_SSET_CK" CHECK ( search_set in ('all','system_list')) ENABLE, 
	 CONSTRAINT "RHN_SAVEDSEARCH_INVERT_CK" CHECK (invert in ('Y','N')) ENABLE, 
	 CONSTRAINT "RHN_SAVEDSEARCH_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_SAVEDSEARCH_NAME_WCID_UQ" UNIQUE ("NAME", "WEB_CONTACT_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_SAVEDSEARCH_WCID_FK" FOREIGN KEY ("WEB_CONTACT_ID")
	  REFERENCES "RHNSAT"."WEB_CONTACT" ("ID") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "RHN_SAVEDSEARCH_TYPE_FK" FOREIGN KEY ("TYPE")
	  REFERENCES "RHNSAT"."RHNSAVEDSEARCHTYPE" ("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" 
 
/
