Main Tables Views Materialized Views Indexes Constraints Triggers Procedures Functions Packages Sequences Java Sources Sanity Check Index DDL scrips
Description Columns Primary key Check Constraints Foreign keys Unique Keys Options Indexes Referenced by Triggers Partitions

RHNCONFIGREVISION

DDL script

Columns

NameTypeNullableDefault valueComment
IDNUMBER(38)N  
REVISIONNUMBER(38)N  
CONFIG_FILE_IDNUMBER(38)N  
CONFIG_CONTENT_IDNUMBER(38)N  
CONFIG_INFO_IDNUMBER(38)N  
DELIM_STARTVARCHAR2(16)N  
DELIM_ENDVARCHAR2(16)N  
CREATEDDATEN(sysdate)  
MODIFIEDDATEN(sysdate)  
CONFIG_FILE_TYPE_IDNUMBER(38)N1  
CHANGED_BY_IDNUMBER(38)Ynull  

Primary key:

Constraint NameColumns
RHN_CONFREVISION_ID_PKID

Foreign Keys:

Constraint NameColumnsReferenced tableReferenced ConstraintOn Delete Rule
RHN_CONFREVISION_CCID_FKCONFIG_CONTENT_ID RHNCONFIGCONTENT RHN_CONFCONTENT_ID_PK NO ACTION
RHN_CONFREVISION_CFID_FKCONFIG_FILE_ID RHNCONFIGFILE RHN_CONFFILE_ID_PK NO ACTION
RHN_CONFREVISION_CID_FKCHANGED_BY_ID WEB_CONTACT WEB_CONTACT_PK NO ACTION
RHN_CONFREVISION_CIID_FKCONFIG_INFO_ID RHNCONFIGINFO RHN_CONFINFO_ID_PK NO ACTION
RHN_CONF_REV_CFTI_FKCONFIG_FILE_TYPE_ID RHNCONFIGFILETYPE RHN_CONFFILETYPE_ID_PK NO ACTION

Options:

OptionSettings
TablespaceDATA_TBS
Index OrganizedNo
Generated by OracleNo
ClusteredNo
NestedNo
TemporaryNo

Indexes:

Index NameTypeUnuquenessColumnsDDL script
RHN_CONFREVISION_CFID_REV_UQNORMALUNIQUECONFIG_FILE_ID , REVISION DDL script
RHN_CONFREVISION_ID_PKNORMALUNIQUEID DDL script

Referenced by:

TableConstraint
RHNACTIONCONFIGFILENAME RHN_ACTIONCF_NAME_CRID_FK
RHNACTIONCONFIGREVISION RHN_ACTIONCR_CRID_FK
RHNCONFIGFILE RHN_CONFFILE_LCRID_FK
RHNSNAPSHOTCONFIGREVISION RHN_SNAPSHOTCR_CRID_FK

Triggers

RHN_CONFREVISION_ACCT_TRIG

Legend: comment string keyword reserved word operator
CREATE TRIGGER 
rhn_confrevision_acct_trig
after insert on rhnConfigRevision
for each row

REFERENCING NEW AS NEW OLD AS OLD
declare
	org_id number;
	available number;
	added number;
begin
	select	cc.org_id id,
			oq.total + oq.bonus - oq.used available,
			content.file_size added
	into	org_id, available, added
	from	rhnConfigContent	content,
			rhnOrgQuota			oq,
			rhnConfigChannel	cc,
			rhnConfigFile		cf
	where	cf.id = :new.config_file_id
			and cf.config_channel_id = cc.id
			and cc.org_id = oq.org_id
			and :new.config_content_id = content.id;
	if added gt; available then
		rhn_exception.raise_exception('not_enough_quota');
	end if;
end;

RHN_CONFREVISION_DEL_TRIG

Legend: comment string keyword reserved word operator
CREATE TRIGGER 
rhn_confrevision_del_trig
before delete on rhnConfigRevision
for each row

REFERENCING NEW AS NEW OLD AS OLD
declare
	cursor snapshots is
		select	snapshot_id id
		from	rhnSnapshotConfigRevision
		where	config_revision_id = :old.id;
begin
	for snapshot in snapshots loop
		update rhnSnapshot
			set invalid = lookup_snapshot_invalid_reason('cr_removed')
			where id = snapshot.id;
		delete from rhnSnapshotConfigRevision
			where snapshot_id = snapshot.id
				and config_revision_id = :old.id;
	end loop;
end;

RHN_CONFREVISION_MOD_TRIG

Legend: comment string keyword reserved word operator
CREATE TRIGGER 
rhn_confrevision_mod_trig
before insert or update on rhnConfigRevision
for each row

REFERENCING NEW AS NEW OLD AS OLD
begin
	:new.modified := sysdate;
end;