RHNCHANNEL
DDL scriptColumns
| Name | Type | Nullable | Default value | Comment |
|---|
| ID | NUMBER(38) | N | | |
| PARENT_CHANNEL | NUMBER(38) | Y | | |
| ORG_ID | NUMBER(38) | Y | | |
| CHANNEL_ARCH_ID | NUMBER(38) | N | | |
| LABEL | VARCHAR2(128) | N | | |
| BASEDIR | VARCHAR2(256) | N | | |
| NAME | VARCHAR2(256) | N | | |
| SUMMARY | VARCHAR2(500) | N | | |
| DESCRIPTION | VARCHAR2(4000) | Y | | |
| PRODUCT_NAME_ID | NUMBER(38) | Y | | |
| GPG_KEY_URL | VARCHAR2(256) | Y | | |
| GPG_KEY_ID | VARCHAR2(14) | Y | | |
| GPG_KEY_FP | VARCHAR2(50) | Y | | |
| END_OF_LIFE | TIMESTAMP(6) WITH LOCAL TIME ZONE | Y | | |
| CHECKSUM_TYPE_ID | NUMBER(38) | Y | | |
| RECEIVING_UPDATES | CHAR(1) | N | ('Y') | |
| LAST_MODIFIED | TIMESTAMP(6) WITH LOCAL TIME ZONE | N | (current_timestamp) | |
| LAST_SYNCED | TIMESTAMP(6) WITH LOCAL TIME ZONE | Y | | |
| CHANNEL_PRODUCT_ID | NUMBER(38) | Y | | |
| CHANNEL_ACCESS | VARCHAR2(10) | Y | ('private') | |
| MAINT_NAME | VARCHAR2(128) | Y | | |
| MAINT_EMAIL | VARCHAR2(128) | Y | | |
| MAINT_PHONE | VARCHAR2(128) | Y | | |
| SUPPORT_POLICY | VARCHAR2(256) | Y | | |
| CREATED | TIMESTAMP(6) WITH LOCAL TIME ZONE | N | (current_timestamp) | |
| MODIFIED | TIMESTAMP(6) WITH LOCAL TIME ZONE | N | (current_timestamp) | |
Primary key:
| Constraint Name | Columns |
|---|
| RHN_CHANNEL_ID_PK | ID
|
Check Constraints:
| Constraint Name | Check Condition |
|---|
| RHN_CHANNEL_RU_CK | receiving_updates in ('Y', 'N') |
Foreign Keys:

Options:
| Option | Settings |
|---|
| Tablespace | USERS |
| Index Organized | No |
| Generated by Oracle | No |
| Clustered | No |
| Nested | No |
| Temporary | No |
Indexes:
Referenced by:
Triggers
RHN_CHANNEL_ACCESS_TRIG
Legend: string keyword reserved word operator
CREATE TRIGGER
rhn_channel_access_trig
after update on rhnChannel
for each row
REFERENCING NEW AS NEW OLD AS OLD
begin
if :old.channel_access = 'protected' and
:new.channel_access != 'protected'
then
delete from rhnChannelTrust where channel_id = :old.id;
end if;
end;
RHN_CHANNEL_DEL_TRIG
Legend: string keyword reserved word operator
CREATE TRIGGER
rhn_channel_del_trig
before delete on rhnChannel
for each row
REFERENCING NEW AS NEW OLD AS OLD
declare
cursor snapshots is
select snapshot_id id
from rhnSnapshotChannel
where channel_id = :old.id;
begin
for snapshot in snapshots loop
update rhnSnapshot
set invalid = lookup_snapshot_invalid_reason('channel_removed')
where id = snapshot.id;
delete from rhnSnapshotChannel
where snapshot_id = snapshot.id
and channel_id = :old.id;
end loop;
end;
RHN_CHANNEL_MOD_TRIG
Legend: string keyword reserved word operator
CREATE TRIGGER
rhn_channel_mod_trig
before insert or update on rhnChannel
for each row
REFERENCING NEW AS NEW OLD AS OLD
begin
:new.last_modified := current_timestamp;
if updating then
if (:old.id != :new.id) or
(:old.parent_channel != :new.parent_channel) or
(:old.org_id != :new.org_id) or
(:old.channel_arch_id != :new.channel_arch_id) or
(:old.label != :new.label) or
(:old.basedir != :new.basedir) or
(:old.name != :new.name) or
(:old.summary != :new.summary) or
(:old.description != :new.description) then
:new.modified := current_timestamp;
end if;
end if;
end;