-- created by Oraschemadoc Wed Mar  4 07:57:35 2020
-- visit http://www.yarpen.cz/oraschemadoc/ for more info

  CREATE TABLE "SPACEUSER"."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, 
	"INSTALLED_SIZE" NUMBER, 
	"BUILD_HOST" VARCHAR2(256), 
	"BUILD_TIME" TIMESTAMP (6), 
	"SOURCE_RPM_ID" NUMBER, 
	"CHECKSUM_ID" NUMBER 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" TIMESTAMP (6) WITH LOCAL TIME ZONE DEFAULT (current_timestamp) NOT NULL ENABLE, 
	"CREATED" TIMESTAMP (6) WITH LOCAL TIME ZONE DEFAULT (current_timestamp) NOT NULL ENABLE, 
	"MODIFIED" TIMESTAMP (6) WITH LOCAL TIME ZONE DEFAULT (current_timestamp) NOT NULL ENABLE, 
	"HEADER_START" NUMBER DEFAULT (-1) NOT NULL ENABLE, 
	"HEADER_END" NUMBER DEFAULT (-1) NOT NULL ENABLE, 
	"MULTI_ARCH" VARCHAR2(16), 
	 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 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_OID_FK" FOREIGN KEY ("ORG_ID")
	  REFERENCES "SPACEUSER"."WEB_CUSTOMER" ("ID") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_NID_FK" FOREIGN KEY ("NAME_ID")
	  REFERENCES "SPACEUSER"."RHNPACKAGENAME" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_EID_FK" FOREIGN KEY ("EVR_ID")
	  REFERENCES "SPACEUSER"."RHNPACKAGEEVR" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_PAID_FK" FOREIGN KEY ("PACKAGE_ARCH_ID")
	  REFERENCES "SPACEUSER"."RHNPACKAGEARCH" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_GROUP_FK" FOREIGN KEY ("PACKAGE_GROUP")
	  REFERENCES "SPACEUSER"."RHNPACKAGEGROUP" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_SRCRPMID_FK" FOREIGN KEY ("SOURCE_RPM_ID")
	  REFERENCES "SPACEUSER"."RHNSOURCERPM" ("ID") ENABLE, 
	 CONSTRAINT "RHN_PACKAGE_CHSUM_FK" FOREIGN KEY ("CHECKSUM_ID")
	  REFERENCES "SPACEUSER"."RHNCHECKSUM" ("ID") ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  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 FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS"  ENABLE ROW MOVEMENT 
/
