-- created by Oraschemadoc Mon Aug 31 10:53:31 2009
-- visit http://www.yarpen.cz/oraschemadoc/ for more info

  CREATE TABLE "MIM1"."RHNPACKAGE" 
   (	"ID" NUMBER NOT NULL ENABLE, 
	"ORG_ID" NUMBER, 
	"NAME_ID" NUMBER NOT NULL ENABLE, 
	"EVR_ID" NUMBER NOT NULL ENABLE, 
	"PACKAGE_ARCH_ID" NUMBER NOT NULL ENABLE, 
	"PACKAGE_GROUP" NUMBER, 
	"RPM_VERSION" VARCHAR2(16), 
	"DESCRIPTION" VARCHAR2(4000), 
	"SUMMARY" VARCHAR2(4000), 
	"PACKAGE_SIZE" NUMBER NOT NULL ENABLE, 
	"PAYLOAD_SIZE" NUMBER, 
	"BUILD_HOST" VARCHAR2(256), 
	"BUILD_TIME" DATE, 
	"SOURCE_RPM_ID" NUMBER, 
	"MD5SUM" VARCHAR2(64) NOT NULL ENABLE, 
	"VENDOR" VARCHAR2(64) NOT NULL ENABLE, 
	"PAYLOAD_FORMAT" VARCHAR2(32), 
	"COMPAT" NUMBER(1,0) DEFAULT (0), 
	"PATH" VARCHAR2(1000), 
	"HEADER_SIG" VARCHAR2(64), 
	"COPYRIGHT" VARCHAR2(128), 
	"COOKIE" VARCHAR2(128), 
	"LAST_MODIFIED" DATE DEFAULT (sysdate) NOT NULL ENABLE, 
	"CREATED" DATE DEFAULT (sysdate) NOT NULL ENABLE, 
	"MODIFIED" DATE DEFAULT (sysdate) NOT NULL ENABLE, 
	"HEADER_START" NUMBER DEFAULT (-1) NOT NULL ENABLE, 
	"HEADER_END" NUMBER DEFAULT (-1) 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 "MIM1"."WEB_CUSTOMER" ("ID") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_NID_FK" FOREIGN KEY ("NAME_ID")
	  REFERENCES "MIM1"."RHNPACKAGENAME" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_EID_FK" FOREIGN KEY ("EVR_ID")
	  REFERENCES "MIM1"."RHNPACKAGEEVR" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_PAID_FK" FOREIGN KEY ("PACKAGE_ARCH_ID")
	  REFERENCES "MIM1"."RHNPACKAGEARCH" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_GROUP_FK" FOREIGN KEY ("PACKAGE_GROUP")
	  REFERENCES "MIM1"."RHNPACKAGEGROUP" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_SRCRPMID_FK" FOREIGN KEY ("SOURCE_RPM_ID")
	  REFERENCES "MIM1"."RHNSOURCERPM" ("ID") ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "DATA_TBS"  ENABLE ROW MOVEMENT 
 
/
