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

  CREATE TABLE "SPACEUSER"."RHNSERVER" 
   (	"ID" NUMBER NOT NULL ENABLE, 
	"ORG_ID" NUMBER NOT NULL ENABLE, 
	"DIGITAL_SERVER_ID" VARCHAR2(64) NOT NULL ENABLE, 
	"SERVER_ARCH_ID" NUMBER NOT NULL ENABLE, 
	"OS" VARCHAR2(64) NOT NULL ENABLE, 
	"RELEASE" VARCHAR2(64) NOT NULL ENABLE, 
	"NAME" VARCHAR2(128), 
	"DESCRIPTION" VARCHAR2(256), 
	"INFO" VARCHAR2(128), 
	"SECRET" VARCHAR2(64) NOT NULL ENABLE, 
	"CREATOR_ID" NUMBER, 
	"AUTO_UPDATE" CHAR(1) DEFAULT ('N') NOT NULL ENABLE, 
	"RUNNING_KERNEL" VARCHAR2(64), 
	"LAST_BOOT" NUMBER DEFAULT (0) NOT NULL ENABLE, 
	"PROVISION_STATE_ID" NUMBER, 
	"CHANNELS_CHANGED" TIMESTAMP (6) WITH LOCAL TIME ZONE, 
	"COBBLER_ID" VARCHAR2(64), 
	"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, 
	 CONSTRAINT "RHN_SERVER_UPDATE_CK" CHECK (auto_update in ('Y', 'N')) ENABLE, 
	 CONSTRAINT "RHN_SERVER_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_SERVER_OID_FK" FOREIGN KEY ("ORG_ID")
	  REFERENCES "SPACEUSER"."WEB_CUSTOMER" ("ID") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "RHN_SERVER_SAID_FK" FOREIGN KEY ("SERVER_ARCH_ID")
	  REFERENCES "SPACEUSER"."RHNSERVERARCH" ("ID") ENABLE, 
	 CONSTRAINT "RHN_SERVER_CREATOR_FK" FOREIGN KEY ("CREATOR_ID")
	  REFERENCES "SPACEUSER"."WEB_CONTACT" ("ID") ON DELETE SET NULL ENABLE, 
	 CONSTRAINT "RHN_SERVER_PSID_FK" FOREIGN KEY ("PROVISION_STATE_ID")
	  REFERENCES "SPACEUSER"."RHNPROVISIONSTATE" ("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 
/
