RHNCHANNELCLONED
DDL scriptColumns
Name | Type | Nullable | Default value | Comment |
---|
ORIGINAL_ID | NUMBER(38) | N | | |
ID | NUMBER(38) | N | | |
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_CHANNELCLONE_ID_PK | ID
|
Foreign Keys:
Unique Keys:
Constraint name | Columns |
---|
RHN_CHANNELCLONE_FCID_TCID_UQ | ORIGINAL_ID
, ID
|
Options:
Option | Settings |
---|
Tablespace | USERS |
Index Organized | No |
Generated by Oracle | No |
Clustered | No |
Nested | No |
Temporary | No |
Indexes:
Triggers
RHN_CHANNEL_CLONED_COMPS_TRIG
Legend: string keyword reserved word operator
CREATE TRIGGER
rhn_channel_cloned_comps_trig
before insert or update on rhnChannelCloned
for each row
REFERENCING NEW AS NEW OLD AS OLD
begin
:new.modified := current_timestamp;
if inserting then
insert into rhnChannelComps
( id, channel_id, comps_type_id, relative_filename,
last_modified, created, modified )
select rhn_channelcomps_id_seq.nextval, :new.id, comps_type_id, relative_filename,
current_timestamp, current_timestamp, current_timestamp
from rhnChannelComps
where channel_id = :new.original_id
and not exists (
select 1
from rhnChannelComps x
where x.channel_id = :new.id
);
end if;
end;