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

  CREATE TABLE "RHNSAT"."RHNPACKAGE" 
   (	"ID" NUMBER CONSTRAINT "RHN_PACKAGE_ID_NN" NOT NULL ENABLE, 
	"ORG_ID" NUMBER, 
	"NAME_ID" NUMBER CONSTRAINT "RHN_PACKAGE_NID_NN" NOT NULL ENABLE, 
	"EVR_ID" NUMBER CONSTRAINT "RHN_PACKAGE_EID_NN" NOT NULL ENABLE, 
	"PACKAGE_ARCH_ID" NUMBER CONSTRAINT "RHN_PACKAGE_PAID_NN" NOT NULL ENABLE, 
	"PACKAGE_GROUP" NUMBER, 
	"RPM_VERSION" VARCHAR2(16), 
	"DESCRIPTION" VARCHAR2(4000), 
	"SUMMARY" VARCHAR2(4000), 
	"PACKAGE_SIZE" NUMBER CONSTRAINT "RHN_PACKAGE_PKG_SIZE_NN" NOT NULL ENABLE, 
	"PAYLOAD_SIZE" NUMBER, 
	"BUILD_HOST" VARCHAR2(256), 
	"BUILD_TIME" DATE, 
	"SOURCE_RPM_ID" NUMBER, 
	"MD5SUM" VARCHAR2(64) CONSTRAINT "RHN_PACKAGE_MD5_NN" NOT NULL ENABLE, 
	"VENDOR" VARCHAR2(64) CONSTRAINT "RHN_PACKAGE_VENDOR_NN" NOT NULL ENABLE, 
	"PAYLOAD_FORMAT" VARCHAR2(32), 
	"COMPAT" NUMBER(*,0) DEFAULT 0, 
	"PATH" VARCHAR2(1000), 
	"HEADER_SIG" VARCHAR2(64), 
	"COPYRIGHT" VARCHAR2(64), 
	"COOKIE" VARCHAR2(128), 
	"LAST_MODIFIED" DATE DEFAULT (sysdate) CONSTRAINT "RHN_PACKAGE_LM_NN" NOT NULL ENABLE, 
	"CREATED" DATE DEFAULT (sysdate) CONSTRAINT "RHN_PACKAGE_CREATED_NN" NOT NULL ENABLE, 
	"MODIFIED" DATE DEFAULT (sysdate) CONSTRAINT "RHN_PACKAGE_MODIFIED_NN" NOT NULL ENABLE, 
	"HEADER_START" NUMBER DEFAULT -1 CONSTRAINT "RHN_PACKAGE_HS_NN" NOT NULL ENABLE, 
	"HEADER_END" NUMBER DEFAULT -1 CONSTRAINT "RHN_PACKAGE_HE_NN" NOT NULL ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_COMPAT_CHECK" CHECK (compat in (1,0)) ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_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_PACKAGE_OID_FK" FOREIGN KEY ("ORG_ID")
	  REFERENCES "RHNSAT"."WEB_CUSTOMER" ("ID") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_NID_FK" FOREIGN KEY ("NAME_ID")
	  REFERENCES "RHNSAT"."RHNPACKAGENAME" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_EID_FK" FOREIGN KEY ("EVR_ID")
	  REFERENCES "RHNSAT"."RHNPACKAGEEVR" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_PAID_FK" FOREIGN KEY ("PACKAGE_ARCH_ID")
	  REFERENCES "RHNSAT"."RHNPACKAGEARCH" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_GROUP_FK" FOREIGN KEY ("PACKAGE_GROUP")
	  REFERENCES "RHNSAT"."RHNPACKAGEGROUP" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_SRCRPMID_FK" FOREIGN KEY ("SOURCE_RPM_ID")
	  REFERENCES "RHNSAT"."RHNSOURCERPM" ("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" 
 
/
