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

  CREATE TABLE "RHNSAT"."RHNPACKAGESOURCE" 
   (	"ID" NUMBER CONSTRAINT "RHN_PKGSRC_ID_NN" NOT NULL ENABLE, 
	"ORG_ID" NUMBER, 
	"SOURCE_RPM_ID" NUMBER CONSTRAINT "RHN_PKGSRC_SRID_NN" NOT NULL ENABLE, 
	"PACKAGE_GROUP" NUMBER CONSTRAINT "RHN_PKGSRC_GROUP_NN" NOT NULL ENABLE, 
	"RPM_VERSION" VARCHAR2(16) CONSTRAINT "RHN_PKGSRC_RPM_VER_NN" NOT NULL ENABLE, 
	"PAYLOAD_SIZE" NUMBER CONSTRAINT "RHN_PKGSRC_PAYSIZE_NN" NOT NULL ENABLE, 
	"BUILD_HOST" VARCHAR2(256) CONSTRAINT "RHN_PKGSRC_BH_NN" NOT NULL ENABLE, 
	"BUILD_TIME" DATE CONSTRAINT "RHN_PKGSRC_BT_NN" NOT NULL ENABLE, 
	"SIGMD5" VARCHAR2(64) CONSTRAINT "RHN_PACKAGE_SIGMD5_NN" NOT NULL ENABLE, 
	"VENDOR" VARCHAR2(64) CONSTRAINT "RHN_PKGSRC_VENDOR_NN" NOT NULL ENABLE, 
	"COOKIE" VARCHAR2(128) CONSTRAINT "RHN_PKGSRC_COOKIE_NN" NOT NULL ENABLE, 
	"PATH" VARCHAR2(1000), 
	"MD5SUM" VARCHAR2(64) CONSTRAINT "RHN_PKGSRC_MD5SUM_NN" NOT NULL ENABLE, 
	"PACKAGE_SIZE" NUMBER CONSTRAINT "RHN_PKGSRC_PS_NN" NOT NULL ENABLE, 
	"LAST_MODIFIED" DATE DEFAULT (sysdate) CONSTRAINT "RHN_PKGSRC_LM_NN" NOT NULL ENABLE, 
	"CREATED" DATE DEFAULT (sysdate) CONSTRAINT "RHN_PKGSRC_CREATED_NN" NOT NULL ENABLE, 
	"MODIFIED" DATE DEFAULT (sysdate) CONSTRAINT "RHN_PKGSRC_MODIFIED_NN" NOT NULL ENABLE, 
	 CONSTRAINT "RHN_PKGSRC_ID_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_PKGSRC_OID_FK" FOREIGN KEY ("ORG_ID")
	  REFERENCES "RHNSAT"."WEB_CUSTOMER" ("ID") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "RHN_PKGSRC_SRID_FK" FOREIGN KEY ("SOURCE_RPM_ID")
	  REFERENCES "RHNSAT"."RHNSOURCERPM" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PKGSRC_GROUP_FK" FOREIGN KEY ("PACKAGE_GROUP")
	  REFERENCES "RHNSAT"."RHNPACKAGEGROUP" ("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" 
 
/
